From e0555a66e14fd3824860f1dc87c3b14ea6aa9535 Mon Sep 17 00:00:00 2001 From: eLBati Date: Fri, 8 Jan 2016 18:08:49 +0100 Subject: [PATCH] [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 --- addons/account/account_invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 90d4d7fd954..7a0d737d847 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -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