[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
This commit is contained in:
Nicolas Martinelli
2018-01-31 09:14:57 +01:00
committed by Nicolas Martinelli
parent a5cbf2105c
commit c52b18e65f
@@ -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