From 2aabdc00c353aa0b2d4e98e66094cee9f149c000 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Fri, 9 Feb 2018 17:29:28 +0100 Subject: [PATCH] [FIX] account: allow XML-RPC call to action_validate_invoice_payment on account.payment. The method was returning no value (~None) which then blown up when serialised back to XMLRPC. Fixes #22630 --- addons/account/models/account_payment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py index 741f3fde668..2456f86a066 100644 --- a/addons/account/models/account_payment.py +++ b/addons/account/models/account_payment.py @@ -505,6 +505,7 @@ class account_payment(models.Model): (transfer_credit_aml + transfer_debit_aml).reconcile() rec.write({'state': 'posted', 'move_name': move.name}) + return True @api.multi def action_draft(self): @@ -519,7 +520,7 @@ class account_payment(models.Model): if any(len(record.invoice_ids) != 1 for record in self): # For multiple invoices, there is account.register.payments wizard raise UserError(_("This method should only be called to process a single invoice's payment.")) - self.post(); + return self.post() def _create_payment_entry(self, amount): """ Create a journal entry corresponding to a payment, if the payment references invoice(s) they are reconciled.