From c3ddef161e236b25c4f89a5e19774ecde248f318 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 30 Jan 2018 20:09:15 +0100 Subject: [PATCH] [FIX] account_check_printing: multiple partners - Create a bill for partner A of an amount X - Create a bill for partner B of an amount Y - Validate both bills - Select both and register a payment by check. Two payments are created with the same amount in words: X + Y. In this specific case, we recompute the amount in words automatically. note: this commit reintroduce the fix c52b18e65 which was lost after changes in 10.0 (line was removed then brought back with 416d07f0b). opw-805842 closes #24569 --- addons/account_check_printing/models/account_payment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_check_printing/models/account_payment.py b/addons/account_check_printing/models/account_payment.py index 89d73820c9c..285348d8819 100644 --- a/addons/account_check_printing/models/account_payment.py +++ b/addons/account_check_printing/models/account_payment.py @@ -32,7 +32,7 @@ class AccountRegisterPayments(models.TransientModel): res = super(AccountRegisterPayments, self)._prepare_payment_vals(invoices) if self.payment_method_id == self.env.ref('account_check_printing.account_payment_method_check'): res.update({ - 'check_amount_in_words': self.check_amount_in_words, + 'check_amount_in_words': self.currency_id.amount_to_text(res['amount']) if self.multi else self.check_amount_in_words, }) return res