From bd4886446b8348582964124a58a47c24fcb934a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Csaba=20T=C3=B3th?= Date: Wed, 2 Jun 2021 21:53:15 +0000 Subject: [PATCH] [FIX] account: fix reference to currency object MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rounding_line_vals is invoked directly with a .create(), so the "currency_id" key's value should be an integer. See line 810. This is hard to catch, i use Sentry on my servers and i found this bug. I cannot provide steps to reproduce, as i just see this bug report in Sentry. closes odoo/odoo#71771 X-original-commit: 38de8fc52b4d6f6bdab4dd5e28eb9e3e5315145c Signed-off-by: William André (wan) --- 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 358b1f917c7..745de3ed97a 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -798,7 +798,7 @@ class AccountMove(models.Model): 'amount_currency': diff_amount_currency, 'partner_id': self.partner_id.id, 'move_id': self.id, - 'currency_id': self.currency_id, + 'currency_id': self.currency_id.id, 'company_id': self.company_id.id, 'company_currency_id': self.company_id.currency_id.id, 'is_rounding_line': True,