From 81e265cda9f54af48a0be76fae6bf7f17371f1fe Mon Sep 17 00:00:00 2001 From: sesn-odoo Date: Mon, 25 Mar 2024 09:37:05 +0100 Subject: [PATCH] [FIX] sale: allow access to parent branch fiscal positions on sale order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, on sale orders, you cannot access parent's fiscal positions from a branch. Steps to reproduce ----------------- * install `sale_management` * set up a company hierarchy. Let's say we have two companies P and C such that C is a branch of P. * let's say that P has a fiscal position F * switch to company C * attempt to set fiscal position F on a sale order You will see that F does not appear on the list. opw-3773335 closes odoo/odoo#159386 X-original-commit: fa419e550497b1291930f9fb8215a719de331024 Signed-off-by: Séna Serge Nshimiyimana (sesn) --- addons/sale/models/sale_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/models/sale_order.py b/addons/sale/models/sale_order.py index e1b27b98861..54007845b14 100644 --- a/addons/sale/models/sale_order.py +++ b/addons/sale/models/sale_order.py @@ -154,7 +154,7 @@ class SaleOrder(models.Model): store=True, readonly=False, precompute=True, check_company=True, help="Fiscal positions are used to adapt taxes and accounts for particular customers or sales orders/invoices." "The default value comes from the customer.", - domain="[('company_id', '=', company_id)]") + ) payment_term_id = fields.Many2one( comodel_name='account.payment.term', string="Payment Terms",