Daily updates from Odoo
Thursday, February 13, 2020
2 changes · master
Code cleanup and technical improvements
This update simplifies internal CRM code that connects leads, opportunities, and customer records, making related conversion wizards more reliable and flexible. It also improves how website visitor contact actions prepare email and SMS messages, reducing errors when customer details need to be created or verified first.
This refactoring removes an unnecessary shared component used by CRM Helpdesk conversion wizards and moves the needed logic directly into the relevant models. It should make lead and customer handling more reliable and easier to maintain, with minimal visible change for users.
Original PR description
PURPOSE This refactoring commit updates enterprise to a commit proposed in community see PR odoo/odoo#41955. In community we removed the crm.partner.binding mixin. Indeed it defines a mixin for…
PURPOSE
This refactoring commit updates enterprise to a commit proposed in community
see PR odoo/odoo#41955. In community we removed the crm.partner.binding
mixin. Indeed it defines a mixin for unnecessary fields, generally either
redefined in inheriting models, either not used at all. It also holds an
utility method we moved directly on crm.lead model.
SPECIFICATIONS
Code move
* move _find_matching_partner to crm.lead model;
* move action field into inheriting models, except crm.lead.convert2ticket
that does not use it;
* move partner_id to inheriting models;
* remove crm.partner.binding model and inheritance;
Improve behavior
* correctly store lead and partner many2one fields on all inheriting
models. It allows to support a default_lead_id instead of always
relying on active_model / active_id, making the wizards more generic;
* update default_get accordingly in various inheriting models in order to
correctly compute lead / partner values;
LINKS
Task ID 2056759 (remove crm.partner.binding mixin)
Task ID 2088565 (convert onchange / default to compute)
Community PR odoo/odoo#41955
Enterprise PR odoo/enterprise#7322