Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][FIX] hr_employee_firstname: removed useless mapped address_home_id #1369

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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", "private_street"]


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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be replaced by work_contact_id? Or is it expected for it to be removed?

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
Loading