Skip to content
Snippets Groups Projects
Commit 4524dcd6 authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[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: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent c16d2827
Branches
Tags
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 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment