-
-
Notifications
You must be signed in to change notification settings - Fork 850
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
[16.0][ADD] partner_address_ok #1782
base: 16.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @norlinhenrik. What is an adress "OK" ?
265129f
to
58f05f7
Compare
A valid postal address. |
Thanks !
|
Hi, as @legalsylvain already said, it should be False by default. |
On the PR for 14.0 I set default=True. |
58f05f7
to
5056c79
Compare
I set default=False to be explicit. |
partner_address_ok/tests/__init__.py
Outdated
@@ -0,0 +1,2 @@ | |||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | |||
from . import test_partner_contact_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I don't think this is the correct test you're trying to import, please fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for finding this error. I have fixed it now.
5056c79
to
25d65bd
Compare
class ResPartner(models.Model): | ||
_inherit = "res.partner" | ||
|
||
address_ok = fields.Boolean( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit perplexed.
It adds a boolean fields without adding any logic such as testing the validity of the address. We have something that exists in -> https://github.com/odoo/odoo/blob/17.0/addons/snailmail/models/snailmail_letter.py#L453
It could be achieved with tags on partners.
I would have prefered a field naming like is_valid_postal_address
which is self explanatory.
NB: I will not block this PR. Feel free to take into account these points
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @leemannd for very good feedback!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB: another solution that was used in 12.0 was to add it into the type -> https://github.com/OCA/partner-contact/tree/12.0/partner_postal_address
But it may not fulfill your need.
No description provided.