Skip to content

18.0 mig hr announcement#1549

Open
Odoodev2 wants to merge 12 commits intoOCA:18.0from
Odoodev2:18.0-mig-hr_announcement
Open

18.0 mig hr announcement#1549
Odoodev2 wants to merge 12 commits intoOCA:18.0from
Odoodev2:18.0-mig-hr_announcement

Conversation

@Odoodev2
Copy link

No description provided.

Copy link
Contributor

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

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

Thanks for the migration! Found a bug in create():

vals_list.get("employee_ids") will crash — with @api.model_create_multi, vals_list is a list of dicts, not a single dict. list doesn't have .get(). The write() method is fine since write() receives a dict.

Should be something like any(v.get("employee_ids") for v in vals_list).

Also, the README badges still point to 17.0 for Weblate and Runboat — should be updated to 18.0.


@api.model_create_multi
def create(self, vals_list):
announcement = super().create(vals_list)
Copy link
Contributor

Choose a reason for hiding this comment

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

vals_list is a list (from @api.model_create_multi), not a dict — list.get() doesn't exist. This will raise AttributeError. Same pattern in write() works because write() receives a dict. Consider iterating: any(v.get("employee_ids") for v in vals_list).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants