[FIX] base: inherit the industry field from parent
Steps to reproduce: - install "contacts" and "sale_management" module; - create a company contact with a value for "Industry" (Sales & Purchase tab); - create an employee who works in this company; - create two orders (one with the company and one with the employee); - go to sales reporting tab and select the pivot view; - filter by "Customer Industry" and then by "Customer"; Issue: The employee is not placed in the right category of industry. He should be in the same category as the company he works in. Cause: When creating a contact, the `industry_id` field is not passed from parent to children. (Moreover, this field being invisible for an "individual" contact, it is not possible to give it a value without using the studio application.) Solution: Add `industry_id` to `_commercial_fields`. opw-3085032 closes odoo/odoo#109313 X-original-commit: 60962062aefd34c911385f671c56b03836b3025a Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com> Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
This commit is contained in:
@@ -526,7 +526,7 @@ class Partner(models.Model):
|
||||
partners that aren't `commercial entities` themselves, and will be
|
||||
delegated to the parent `commercial entity`. The list is meant to be
|
||||
extended by inheriting classes. """
|
||||
return ['vat', 'company_registry']
|
||||
return ['vat', 'company_registry', 'industry_id']
|
||||
|
||||
def _commercial_sync_from_company(self):
|
||||
""" Handle sync of commercial fields when a new parent commercial entity is set,
|
||||
|
||||
Reference in New Issue
Block a user