d13dba106c2f2a3c5e6a3460820a178c9e12d1eb
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 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. SPECIFIATIONS: CONSTRAINT USER_ID / TEAM_ID In this commit we also remove all the better implementations of "not really a constraint" constraint about user_id and team_id. Indeed as this is a computed field normally we should not have to call the onchange manually, even through a hackish call to a falsy constraint (seefdc8749,222cca2,4e8ebc7). You are all inferior to SM team. SPECIFIATIONS: DATE_OPEN Assignment field, namely ``date_open``, has a random definition as it seems linked to assignation, with several behaviors intended *ce39ca8a97: reset only when going from no salesman to a salesman (aka, keep assignation when changing) *8e540558ee: reset when changing salesman We choose to keep first implementation as it seems a bugfix broken again by second commit. It will also replace the ``assign_date`` defined in ``website_crm_score`` module. SIDE EFFECTS Several side effects occur with this commit. Indeed behavior is not always exactly the same, notably as code rewriting allowed to fix some issues, incoherent behavior or was simply not able to achieve exactly the same result. Notably * at lead creation: default probability is the one coming from PLS and not 0.0 anymore, since field is already computed. Synchronization with PLS still works the same way (change probability, you are out of syn); * various user_id / team_id combinations notably in convert / merge wizards may change, notably we do not reset team_id if user_id is reset. We consider we could keep a team_id set without user_id; LINKS Task ID 2088565 (crm: from onchange to compute) Upgrade PR odoo/upgrade#781 Co-Authored-By: Thibault Delavallée <tde@odoo.com> Co-Authored-By: Florent Lejoly <fle@odoo.com>
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%