-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
[14.0][MIG] l10n_be_cooperator_national_number #69
[14.0][MIG] l10n_be_cooperator_national_number #69
Conversation
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
…any_default_get() Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
l10n_be_cooperator_national_number/models/subscription_request.py
Outdated
Show resolved
Hide resolved
l10n_be_cooperator_national_number/views/subscription_request_view.xml
Outdated
Show resolved
Hide resolved
l10n_be_cooperator_national_number/views/subscription_request_view.xml
Outdated
Show resolved
Hide resolved
6718890
to
b124beb
Compare
@victor-champonnois Needs another review for refactoring |
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
b124beb
to
0393cae
Compare
In some scenarios, the migration is run on a database that does not yet have the requisite fields in the database. By making it a post-migration script, we avoid the problem. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
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.
yay, more tests! 👍
"If the 'Require National Number' toggle is enabled," | ||
" then so must the 'Display National Number' toggle." |
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.
"If the 'Require National Number' toggle is enabled," | |
" then so must the 'Display National Number' toggle." | |
'If the "Require National Number" toggle is enabled,' | |
' then so must the "Display National Number" toggle.' |
i think that delimiting strings with double quotes is more common in user-facing text.
…eld to res.partner
On the company, two new toggles 'Display National Number' and 'Require National | ||
Number' are added. In order to expose the functionality of this module, you must | ||
enable these toggles for every company that wishes to use it. 'Display' shows | ||
the field and allows it to be filled in. 'Require' makes the field mandatory. |
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.
Shouldn't we be able to display the field and use it without making it mandatory ? If not what's the point in having two toggles ?
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.
That's what the 'Display' toggle is for. When the 'Display' toggle is disabled, it's as if this module isn't installed. Useful for multi-company.
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.
Ok, it's just that the sentence "In order to expose the functionality of this module, you must enable these toggles for every company that wishes to use it.", seems to mean that you have to enable both toggles for the functionality to work, while actually you can only toggle "display" and the functionality will work (without requirements on the NRN).
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.
Ah, maybe let's write 'one or both of these toggles'?
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.
yes, LGTM
return partner | ||
|
||
def create_coop_partner(self): | ||
partner = super().create_coop_partner() | ||
self.create_national_number(partner) | ||
if self.require_national_number: |
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.
why putting a condition on "require" and not "display" here ? If the require config is unchecked but display is checked it will not write the national number on the partner ?
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.
Good call. I will patch this up, because simply switching to display
won't suffice.
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.
This was surprisingly difficult to fix. Done now. Ready for another review.
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.
Code and functional review OK
…when not required
f45e99e
to
2fb232c
Compare
bf7c168
to
69057a4
Compare
This PR has the |
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. |
/ocabot merge nobump |
On my way to merge this fine PR! |
Congratulations, your PR was merged at e9d1397. Thanks a lot for contributing to OCA. ❤️ |
internal task: https://gestion.coopiteasy.be/web#view_type=form&model=project.task&id=10633&active_id=10633&menu_id=
other internal task: https://gestion.coopiteasy.be/web#id=10844&action=475&active_id=107&model=project.task&view_type=form&menu_id=536
depends on OCA/l10n-belgium#190