Skip to content

Commit

Permalink
[FIX] hr_employee_firstname: replace usage of address_home_id
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeguerriat-msf committed Dec 30, 2024
1 parent 1ffb69c commit fbb60a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hr_employee_firstname/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

_logger = logging.getLogger(__name__)

UPDATE_PARTNER_FIELDS = ["firstname", "lastname", "user_id", "address_home_id"]
UPDATE_PARTNER_FIELDS = ["firstname", "lastname", "user_id", "work_contact_id"]


class HrEmployee(models.Model):
Expand Down Expand Up @@ -168,7 +168,7 @@ def _install_employee_firstname(self):
def _update_partner_firstname(self):
for employee in self:
partners = employee.mapped("user_id.partner_id")
partners |= employee.mapped("address_home_id")
partners |= employee.mapped("work_contact_id")

Check warning on line 171 in hr_employee_firstname/models/hr_employee.py

View check run for this annotation

Codecov / codecov/patch

hr_employee_firstname/models/hr_employee.py#L171

Added line #L171 was not covered by tests
partners.write(
{"firstname": employee.firstname, "lastname": employee.lastname}
)
Expand Down

0 comments on commit fbb60a1

Please sign in to comment.