Daily updates from Odoo
Monday, December 16, 2019
1 change · master
Code cleanup and technical improvements
Mass mailing and SMS mailing setup fields now keep their values through stored editable computations instead of temporary form-change logic. This should preserve the same user experience while making mailing configuration more consistent, easier to maintain, and better covered by tests.
Original PR description
PURPOSE Try to move from onchange / default_get to stored editable computed fields. Normally behavior should be the same (computed or set by user), with support in create / write + onchange without…
PURPOSE Try to move from onchange / default_get to stored editable computed fields. Normally behavior should be the same (computed or set by user), with support in create / write + onchange without additional code. SPECIFICATIONS Update classic fields with onchange to stored editable computed fields. It means their value will come either from manual user input, either computed based on triggers. Purpose is to remove all onchange and default_get when possible. Clean fields definition inconsistencies, like default / required on computed fields. Indeed computed fields should always have a value, maybe coming from user input. They should not have default / required that are attributes for classic fields. Mailing domain computation is also cleaned and is now reset once the mailing domain is changed. Indeed trying to keep a previous domain based on try / except has no meaning from functional point of view. If model changes then domain should change as it is a business record, not just a technical domain to try to apply. Finally add some tests to help develop and maintain those fields computation. LINKS Task ID 2088577 PR #41877 Enterprise PR odoo/enterprise#7278