-
-
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
[16.0][IMP] Set birthdate to required on sub request #111
[16.0][IMP] Set birthdate to required on sub request #111
Conversation
bb9ed4e
to
d3552c7
Compare
@huguesdk @robinkeunen @remytms for review |
<field name="birthdate" /> | ||
<field name="birthdate" required="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.
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).
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.
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.
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 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.
d3552c7
to
90e0727
Compare
The birthdate is necessary for some later cooperator actions, so it must be set as required.
90e0727
to
cc28eb6
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.
thanks! lgtm!
Maybe this should not be done : very often the cooperative don't have the information on birthdate. It should not block the implementation. |
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. |
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=