[FIX] point_of_sale: use mapped taxes when creating account moves
We have a tax_ids_after_fiscal_position field on pos.order.line that contains the mapped taxes. We should use that to create the account moves. Otherwise the Point of Sale will create unbalanced journal entries. Fixes #9815
This commit is contained in:
@@ -1324,7 +1324,7 @@ class pos_order(osv.osv):
|
||||
|
||||
# Create the tax lines
|
||||
taxes = []
|
||||
for t in line.product_id.taxes_id:
|
||||
for t in line.tax_ids_after_fiscal_position:
|
||||
if t.company_id.id == current_company.id:
|
||||
taxes.append(t.id)
|
||||
if not taxes:
|
||||
|
||||
Reference in New Issue
Block a user