[FIX] sale: allow access to parent branch fiscal positions on sale order

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) <sesn@odoo.com>
This commit is contained in:
sesn-odoo
2024-03-27 17:44:57 +00:00
parent 7ac5dcce09
commit 81e265cda9
+1 -1
View File
@@ -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",