-
- Downloads
[FIX] sale: display related SO for intermediate contacts
Current behaviour:
In the context of a multilevel contact hierarchy, if a contact is creating an SO, only that contact and it's commercial partner (usually the first company when going up in hierarchy from that contact) can see the SO.
The other contacts that are in that hierarchy could see the number of related SO on the smart button, but once clicking on it, no SO were shown.
Expected behaviour:
Every direct or indirect parent of a contact should be able to see the SO, as shown in the smart button count.
Steps to reproduce:
- Create 3 contacts with the following hierarchy: Company -> Contact 1 -> Contact 2 (Company is the root)
- Create an SO with Contact 2 as a customer
- On each of the contacts, click on the SO smart button, all of them have 1 SO shown on the button, but only Constact 1 has none shown once clicked. (Regardless if Contact 1 is an Individual or Company)
Fix:
Simplify domain search to only take into account the children's ids.
There is no need to make a distinction between a contact that is a company or not, since all commercial_partners are also partners by default.
Affected versions:
- 14.0
- 15.0
- saas-15.2
- saas-15.3
- master
opw-2961030
closes odoo/odoo#100377
Signed-off-by:
Piryns Victor (pivi) <pivi@odoo.com>
Please register or sign in to comment