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] partner_event: handle contacts with mobile field #444

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from

Conversation

em230418
Copy link

In Odoo event.registration.mobile field does not exist.

As result before this commit, if you manually create registration with partner that has "mobile" field set, KeyError will be raised.

Notes for future migrations to 19.0+ included.

@em230418 em230418 force-pushed the 17.0-partner_event-fix-mobile branch from 292f71a to 741cb8a Compare February 28, 2025 09:33
@em230418
Copy link
Author

codecov/patch — 88.88% of diff hit (target 96.89%)

I don't know, what it asks from me

@pedrobaeza pedrobaeza modified the milestones: 12.0, 17.0 Feb 28, 2025
@pedrobaeza pedrobaeza changed the title [FIX] partner_event: handle contacts with mobile field [17.0][FIX] partner_event: handle contacts with mobile field Feb 28, 2025
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

The codecov check is saying that the test coverage is decreasing, but it's not enforced. I see you have added regression tests, so maybe not all the new lines are covered by these tests.

)

Copy link
Member

Choose a reason for hiding this comment

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

Don't add empty lines inside method, and more if the previous style was this way.

phone = vals.get("phone") or mobile
if phone:
vals["phone"] = phone

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

@em230418 em230418 marked this pull request as draft March 4, 2025 05:14
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

Please squash both commits into one.

In Odoo event.registration.mobile field does not exist.

As result before this commit, if you manually create
registration with partner that has "mobile" field set,
KeyError will be raised.

Notes for future migrations to 19.0+ included.
@em230418 em230418 force-pushed the 17.0-partner_event-fix-mobile branch from f2c20f2 to b6c6b42 Compare March 4, 2025 07:29
@em230418 em230418 marked this pull request as ready for review March 4, 2025 09:33
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.

2 participants