From 4524dcd69158763575124e5867a7e1d295ebe034 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 12 Mar 2019 12:47:18 +0000 Subject: [PATCH] [FIX] sale: fiscal position - Create a fiscal position FP which maps the deposit product account to another account - Create a SO, use the fiscal position FP. - Create a downpayment The account is not mapped following the fiscal position. opw-1947069 closes odoo/odoo#31781 Signed-off-by: Nicolas Martinelli (nim) --- addons/sale/wizard/sale_make_invoice_advance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index 704c568b7f7..c528c25b7d2 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -65,7 +65,7 @@ class SaleAdvancePaymentInv(models.TransientModel): account_id = False if self.product_id.id: - account_id = self.product_id.property_account_income_id.id or self.product_id.categ_id.property_account_income_categ_id.id + account_id = order.fiscal_position_id.map_account(self.product_id.property_account_income_id or self.product_id.categ_id.property_account_income_categ_id).id if not account_id: inc_acc = ir_property_obj.get('property_account_income_categ_id', 'product.category') account_id = order.fiscal_position_id.map_account(inc_acc).id if inc_acc else False