Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] sale: fix recompute of fiscal position
The `fiscal_position_id` field actually depends on both the `shipping_partner_id` and the `partner_id` field, not just the former. Theoretically the recompute should trigger on both fields anyway because changing the `partner_id` will automatically change the `shipping_partner_id`. Unfortunately this onchange chaining does not work as expected as of Odoo 9, at least when the `partner_id` field is set to the same value (was done for optimization reasons). This special case really happens when you edit the Partner from a sales order form view, and save the changes. It triggers a "dummy on_change" for the `partner_id` value, with the same value as before. If the edit changed the fiscal position or another field on which it depends, a recompute is really needed. Adding the direct dependency works around this limitation, and is semantically valid, too. An extra fix of this special case in the framework might still be nice to have, though. Ref: feedback ID 29042
- Loading branch information