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_second_lastname: removed useless mapped address_home_id #1370

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
2 changes: 1 addition & 1 deletion hr_employee_second_lastname/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,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 address_id instead?

CC @xmglord

Copy link

Choose a reason for hiding this comment

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

No it should be replaced with work_contact_id since address_home_id was split in multiple fields. I took this from Odoo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your feedback, I will fix this quickly.
Regards

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's done, but the tests are now failing. Should I do something else?

partners |= employee.mapped("work_contact_id")

Check warning on line 78 in hr_employee_second_lastname/models/hr_employee.py

View check run for this annotation

Codecov / codecov/patch

hr_employee_second_lastname/models/hr_employee.py#L78

Added line #L78 was not covered by tests
partners.write(
{
"firstname": employee.firstname,
Expand Down
Loading