Daily updates from Odoo
Tuesday, March 24, 2020
1 change · master
Code cleanup and technical improvements
CRM lead and sales team fields now update through a more consistent stored-field approach instead of separate onchange/default logic. This should preserve existing behavior while making lead assignment, conversion flows, and website CRM scoring easier to maintain and more reliable.
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. USE EDITABLE STORED FIELDS 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. CLEAN MODELS IN WEBSITE CRM SCORE Purpose of this merge is also to clean models in website crm score. Future tasks will improve the use of sales team in crm and first steps is to clean a bit models linked to sales team. LINKS Task ID 2088565 (crm: from onchange to compute) Community PR odoo/odoo#41955 Enterprise PR odoo/enterprise#7322 Upgrade PR odoo/upgrade#781