-
-
Notifications
You must be signed in to change notification settings - Fork 47
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] New module l10n_be_bpost_address_validation #186
base: 16.0
Are you sure you want to change the base?
Conversation
db727c7
to
fa27086
Compare
926c5f8
to
0667bba
Compare
d95fa66
to
7e27e4f
Compare
…artner's address or suggest a change
… some more tests for the wizard
…on to l10n_be_bpost_address_validation
7e27e4f
to
baeeed6
Compare
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 this great addon. Some comments but your are on the good way.
l10n_be_bpost_address_validation/tests/test_bpost_address_validation_wizard.py
Show resolved
Hide resolved
_name = "bpost.address.validation.wizard" | ||
|
||
partner_id = fields.Many2one("res.partner", readonly=True) | ||
is_valid = fields.Boolean(compute="_compute_response_address") |
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'll submit a PR on your branch to simplify the code. Since all your fields are computed, they should be declared as is and Odoo will only call the compute method once for all the fields. Moreover, Your compute method should delcare dependecies on subfields of partner_id to ensure that when the street
or zip
or city
fields are updated, the recompute is triggered.
see kouffsamuel#1
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.
a577957
to
40f128c
Compare
@kouffsamuel Can you take a look at kouffsamuel#1? |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
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.
Thanks!
|
||
@classmethod | ||
def tearDownClass(cls): | ||
super(TestBpostAddressValidationWizard, cls).tearDownClass() |
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.
Is this still needed?
|
||
@classmethod | ||
def tearDownClass(cls): | ||
super(TestResPartner, cls).tearDownClass() |
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.
Is this still needed?
_name = "bpost.address.validation.wizard" | ||
|
||
partner_id = fields.Many2one("res.partner", readonly=True) | ||
is_valid = fields.Boolean(compute="_compute_response_address") |
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.
|
||
|
||
class BpostAddressValidationWizard(models.TransientModel): | ||
_name = "bpost.address.validation.wizard" |
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.
@kouffsamuel Could you put a description attribute here ?
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 fix it. Is it ok now ?
…BpostAddressValidationWizard
superseded by #228 |
This PR will allow to validate the partner's address with the API of bpost.