Skip to content
Snippets Groups Projects
Commit aaadfd7d authored by Kirti Choudhary's avatar Kirti Choudhary Committed by Nicolas Martinelli
Browse files

[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
parent 71476226
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment