From c52b18e65f49df6da97e21b28f8d7dc6e6edc2a0 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. opw-805842 --- 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 aa49b0f1993..65d734fd11a 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, 'check_manual_sequencing': self.check_manual_sequencing, }) return res