From 721260d2a713156517b698da8d74cfd33f808d48 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Tue, 9 Oct 2018 15:25:12 +0000 Subject: [PATCH] [FIX] account: retrieve bank statement for process_reconciliation Multicurrency is ON Your company in USD Make a bank journal in EUR Create a statement and push reconcile In the widget, create a line with a tax and hit reconcile Before this commit, the amount_currency field of the tax move line was not filled After this commit it is OPW 1885014 closes odoo/odoo#27592 --- addons/account/models/account_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index b3b026dc66f..62daabe5abf 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1306,7 +1306,7 @@ class AccountMoveLine(models.Model): 'credit': tax_vals['amount'] < 0 and -tax_vals['amount'] or 0.0, 'analytic_account_id': vals.get('analytic_account_id') if tax.analytic else False, } - bank = self.env["account.bank.statement"].browse(vals.get('statement_id')) + bank = self.env["account.bank.statement.line"].browse(vals.get('statement_line_id')).statement_id if bank.currency_id != bank.company_id.currency_id: ctx = {} if 'date' in vals: