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

[14.0][MIG] l10n_be_cooperator_national_number #69

Merged

Conversation

victor-champonnois and others added 9 commits May 23, 2023 15:45
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>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
…any_default_get()

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
@carmenbianca carmenbianca marked this pull request as ready for review May 31, 2023 08:55
@carmenbianca carmenbianca force-pushed the 14.0-mig-l10n_be_cooperator_national_number branch 4 times, most recently from 6718890 to b124beb Compare May 31, 2023 12:24
@carmenbianca
Copy link
Member Author

@victor-champonnois Needs another review for refactoring

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
@carmenbianca carmenbianca force-pushed the 14.0-mig-l10n_be_cooperator_national_number branch from b124beb to 0393cae Compare June 15, 2023 14:05
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>
Copy link
Member

@huguesdk huguesdk left a comment

Choose a reason for hiding this comment

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

yay, more tests! 👍

Comment on lines 22 to 23
"If the 'Require National Number' toggle is enabled,"
" then so must the 'Display National Number' toggle."
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
"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.

Comment on lines +1 to +4
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.
Copy link
Member

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 ?

Copy link
Member Author

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.

Copy link
Member

@victor-champonnois victor-champonnois Jul 18, 2023

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).

Copy link
Member Author

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'?

Copy link
Member

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:
Copy link
Member

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 ?

Copy link
Member Author

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.

Copy link
Member Author

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.

Copy link
Member

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

@carmenbianca carmenbianca force-pushed the 14.0-mig-l10n_be_cooperator_national_number branch from f45e99e to 2fb232c Compare July 17, 2023 12:40
@carmenbianca carmenbianca force-pushed the 14.0-mig-l10n_be_cooperator_national_number branch from bf7c168 to 69057a4 Compare July 17, 2023 13:52
@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link

github-actions bot commented Jan 7, 2024

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.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 7, 2024
@github-actions github-actions bot closed this Feb 11, 2024
@huguesdk huguesdk added no stale Use this label to prevent the automated stale action from closing this PR/Issue. and removed stale PR/Issue without recent activity, it'll be soon closed automatically. labels Feb 12, 2024
@huguesdk huguesdk reopened this Feb 12, 2024
@dreispt
Copy link
Member

dreispt commented May 2, 2024

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 14.0-ocabot-merge-pr-69-by-dreispt-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit f37dc36 into OCA:14.0 May 2, 2024
8 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at e9d1397. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved merged 🎉 no stale Use this label to prevent the automated stale action from closing this PR/Issue. ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants