4ef97f21257a6e647d3bcefece423e59dc7bbf43
Client issue: when updating the company of a contact, the Display Name keeps using the previous company's name, so given Bob in company A, if Bob is moved to company B the form's title remains "A, Bob" instead of becoming "B, Bob". More annoying, if Bob is moved back to A the name becomes "B, Bob". On res.partner, `display_name` is a stored computed field which depends on `commercial_company_name` (via `name_get` -> `_get_name` -> `_get_contact_name`). This is an other stored computed name, which depends on `commercial_partner_id`, which is yet another stored computed name, which depends on the `parent_id`. The dependencies are meh but usually resolve fine, the issue occurs when a base.automation rule is created with a non-empty domain (including an empty literal list, which was the case here): when the first field of the sequence is computed, base.automation's `_compute_field_value` is called. This calls `_filter_pre`, which (because `filter_pre_domain` is non-empty) calls `search` on the model. This would normally be innocuous as `search` will only flush the fields used in the search, however for `res.partner` the default `_order` is... `display_name`. Meaning we flush that computation, forcing the computation of `commercial_company_name`, but since `commercial_partner_id` is being computed we reuse its old value (or something), which is not re-recomputed after the `commercial_partner_id` computation ends. So rather than resolve a full search involving an order, filter the records in-place. OPW-2427264 closes odoo/odoo#67987 X-original-commit: 221ea6079b2beeb66c4cfa48b237791e1b380c5e Signed-off-by: Raphael Collet (rco) <rco@openerp.com> Signed-off-by: Xavier Morel (xmo) <xmo@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%