6ea7a9a975225c08a384567d5ddb05213df0dde4
PURPOSE Distinguish synchronization of partner values on lead: address fields (all or none), classic fields (propagate if set) and special cases (names-alike). SPECIFICATIONS Follow up of https://github.com/odoo/odoo/commit/f8179007f9aa662be7318edeb18426ea1c906c15 Context: many fields are now synchronized from the partner_id: address fields as well as other contact fields. A first commit 9c9f477f04e8f4ee9b18092fe894890c2ab31b58 kept the value from the lead if the value from the partner was empty. This lead to mixed address fields. A second commit fixed that behavior f8179007f9aa662be7318edeb18426ea1c906c15 by taking the value from the partner only when it was set. Problem: This erases too much information. ``` >>> lead.partner_name 'testtest' >>> partner_id.name 'testtest@mailinator.com' >>> partner_id.parent_id res.partner() >>> partner_id.is_company False >>> lead.write({'partner_id': partner_id.id}) >>> lead.partner_name False ``` We indeed need a consistent address but for the other fields we want to keep the maximum of data. SOLUTION For the address fields, take all the values from the partner if one of the address fields is defined, otherwise keep the information defined on the lead. For all the other fields keep the lead information if the partner information is empty. LINKS Task ID-2316828 PR #55825 X-original-commit https://github.com/odoo/odoo/pull/55194/commits/f53fba6663a34e8e6b13354dde3dc225f5814de3 X-original-PR #55194 X-original-commit: b136df8530279a54c9be96beeea9bdda01643000
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%