Skip to content

Commit

Permalink
[MIG] hr_employee_id: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
maisim committed Jun 27, 2024
1 parent 778ceef commit 2894b6c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions hr_employee_id/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ def _generate_identification_id(self):
)

@api.model
def create(self, vals):
if not vals.get("identification_id"):
vals["identification_id"] = self._generate_identification_id()
return super(HrEmployee, self).create(vals)
def create(self, vals_list):
records = super(HrEmployee, self).create(vals_list)

for record in records:
if not record.identification_id:
record.identification_id = record._generate_identification_id()

return records

0 comments on commit 2894b6c

Please sign in to comment.