Tuesday, March 10, 2020
1 change · master
Code cleanup and technical improvements
Event-related settings now use stored editable values so information can be filled automatically while still allowing manual changes. This reduces duplicated logic, keeps event, website event, ticketing, and question behavior more consistent, and improves demo data and event copying behavior.
Original PR description
PURPOSE Try to move from onchange / default_get to stored editable computed fields. Behavior should be the same (computed or set by user), with support of create / write / onchange field update…
PURPOSE
Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.
SPECIFICATIONS: GLOBAL RULES
Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.
Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.
Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.
SPECIFICATIONS: OTHER COMMITS
Perform some light code cleaning before updating fields.
Keep some explicit onchanges:
* onchange partner on registration: required as UI flow is a bit different
from automated code update;
* onchange track boolean on event: allow to simplify fields dependencies;
Rename event type default_registration_max to seats_max to match
naming.
Improve event type data and demo
See sub commits for more details.
LINKS
Task ID 2089156
Community PR #42911
Upgrade PR odoo/upgrade#912