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

[16.0][IMP] Set birthdate to required on sub request #111

Conversation

victor-champonnois
Copy link
Member

@victor-champonnois victor-champonnois commented Feb 6, 2024

The birthdate is necessary for some later cooperator actions, so it must be set as required.
It is set in the view and not in python because it must be compatible with previous data for wich birthdate might not have been set.

internal task : https://gestion.coopiteasy.be/web#id=8127&action=475&active_id=524&model=project.task&view_type=form&menu_id=

@victor-champonnois victor-champonnois changed the title [IMP] Set birthdate to required on sub request [16.0][IMP] Set birthdate to required on sub request Feb 6, 2024
@victor-champonnois victor-champonnois force-pushed the 16.0-birthdate-required-on-sub-request branch 2 times, most recently from bb9ed4e to d3552c7 Compare February 6, 2024 09:58
@victor-champonnois
Copy link
Member Author

@huguesdk @robinkeunen @remytms for review

<field name="birthdate" />
<field name="birthdate" required="1" />
Copy link
Member

Choose a reason for hiding this comment

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

is there a reason to use 1 instead of True? i know that both work and both can be found in odoo’s views (even twice as many 1 than True), but i think it’s better to use the proper type (as internally it’s a boolean property).

Copy link
Member

Choose a reason for hiding this comment

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

even though we discussed otherwise previously, i now think that it’s better to set the required property on the field in the model instead of in the view. it will issue a warning when updating a module if existing tables have null values there, but it will still work, the field will be required in the view automatically, and it is much cleaner.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I think you're right. The warning would make sense, since there should be birthdate on cooperators.
I fixed it. Also fixed the demo data.

@victor-champonnois victor-champonnois force-pushed the 16.0-birthdate-required-on-sub-request branch from d3552c7 to 90e0727 Compare February 8, 2024 10:29
The birthdate is necessary for some later cooperator actions, so it must be set as required.
@victor-champonnois victor-champonnois force-pushed the 16.0-birthdate-required-on-sub-request branch from 90e0727 to cc28eb6 Compare February 8, 2024 10:55
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.

thanks! lgtm!

@victor-champonnois
Copy link
Member Author

Maybe this should not be done : very often the cooperative don't have the information on birthdate. It should not block the implementation.

Copy link

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 Jul 28, 2024
@github-actions github-actions bot closed this Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants