From aaadfd7d768e6271afc287cea2de19c769aa786a Mon Sep 17 00:00:00 2001 From: Kirti Choudhary Date: Fri, 9 Mar 2018 18:43:03 +0530 Subject: [PATCH] [FIX] sale: income account in invoice with down payments When creating an invoice with 'Down payment' option for an SO, it should first consider income account of the 'Deposit Product'. if it does not have one then it should consider that product category's income account. Fixes #23100 Task# 1819531 --- 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 eca97519e48..ee304b8881e 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 + account_id = self.product_id.property_account_income_id.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