Files
odoo_source/odoo
Goffin Simonandkmagusiak <> 0248e490f6 [FIX] base: Commercial fields not syncing after changing parent_id
Steps to reproduce the bug:

Here are aliases for the used contacts:
- A: Azure Interior
- B: Gemini Furniture
- C: Gemini Furniture, Edwin Hansen
- D: (delivery address for Edwin Hansen)

1. Login on a runbot.
2. Set VAT of A and B to different values.
3. Open C, and create a delivery address: D
4. Check: VAT of D = VAT of B
5. Change the related company of C from B to A.

Bug:

The VAT of C = VAT of A, however VAT of D did not change.

When syncing the commercial fields of a partner, we also sync his childs.

PS: Due to function _compute_commercial_partner, the commercial partner is always updated for
all the childs.

So the condition child.commercial_partner_id != self.commercial_partner_id
is never satisfied in function _children_sync and the commercial fields were
never updated.

opw:3111493

closes odoo/odoo#115932

X-original-commit: df87448f2a39eead079cffea566cd760a8918542
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
Co-authored-by: kmagusiak <>
2023-03-20 19:15:27 +01:00
..
…
…
2023-03-14 15:52:10 +01:00
2023-03-14 15:52:10 +01:00
2023-03-20 15:31:27 +01:00