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
closesodoo/odoo#109313
X-original-commit: 60962062aefd34c911385f671c56b03836b3025a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>