summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2018-01-30 20:09:15 +0100
committerNicolas Martinelli <nim-odoo@users.noreply.github.com>2018-01-31 09:14:57 +0100
commitc52b18e65f49df6da97e21b28f8d7dc6e6edc2a0 (patch)
tree1ed2adfee54221add62fec019e117a982d5dabf8
parenta5cbf2105c2d24ed913c2875f1d3f8312ab2700f (diff)
[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
-rw-r--r--addons/account_check_printing/models/account_payment.py2
1 files changed, 1 insertions, 1 deletions
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