From ff80efd71ea470cf56a91e62f674d2959b9aacd0 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 6 Aug 2018 17:25:15 +0200 Subject: [PATCH] [FIX] account: define method in correct model Oversight of previous forward-port. --- addons/account/models/account_payment.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py index d782b91fee7..121b71ca79a 100644 --- a/addons/account/models/account_payment.py +++ b/addons/account/models/account_payment.py @@ -205,6 +205,12 @@ class account_abstract_payment(models.AbstractModel): total += payment_currency.with_context(date=self.payment_date).compute(amount_total, currency) return total + +class account_register_payments(models.TransientModel): + _name = "account.register.payments" + _inherit = 'account.abstract.payment' + _description = "Register payments on multiple invoices" + @api.onchange('journal_id') def _onchange_journal(self): res = super(account_register_payments, self)._onchange_journal() @@ -213,12 +219,6 @@ class account_abstract_payment(models.AbstractModel): self.amount = abs(self._compute_payment_amount(invoices)) return res - -class account_register_payments(models.TransientModel): - _name = "account.register.payments" - _inherit = 'account.abstract.payment' - _description = "Register payments on multiple invoices" - @api.model def default_get(self, fields): rec = super(account_register_payments, self).default_get(fields)