Skip to content

Commit

Permalink
[17.0][FIX] hr_employee_firstname: removal of the mapped method which…
Browse files Browse the repository at this point in the history
… became useless with the address_home_id field, this no longer exists in v17 and replaced by a non-relational field (field.char) named private_street
  • Loading branch information
DorianMAG committed Jun 20, 2024
1 parent 5e65f35 commit 529904e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 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", "private_street"]


class HrEmployee(models.Model):
Expand Down Expand Up @@ -168,7 +168,6 @@ 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.write(
{"firstname": employee.firstname, "lastname": employee.lastname}
)
Expand Down

0 comments on commit 529904e

Please sign in to comment.