[FIX] account: `amount_currency` when grouping invoice lines
when using a journal with 'Group Invoice Lines' and issuing an invoice with foreign currency with more than 1 line (of the same product, or no product), the amount currency in the journal item associated to the merged invoice lines was wrong. It took into account the `amount_currency` of the first line only, ignoring the `amount_currency` of the remaining merged lines. opw-670972 Closes #10375
This commit is contained in:
parent
14282f1659
commit
e0555a66e1
|
@ -779,6 +779,7 @@ class account_invoice(models.Model):
|
|||
line2[tmp]['debit'] = (am > 0) and am or 0.0
|
||||
line2[tmp]['credit'] = (am < 0) and -am or 0.0
|
||||
line2[tmp]['tax_amount'] += l['tax_amount']
|
||||
line2[tmp]['amount_currency'] += l['amount_currency']
|
||||
line2[tmp]['analytic_lines'] += l['analytic_lines']
|
||||
else:
|
||||
line2[tmp] = l
|
||||
|
|
Loading…
Reference in New Issue