Skip to content

Commit

Permalink
[FIX] account: allow XML-RPC call to action_validate_invoice_payment …
Browse files Browse the repository at this point in the history
…on account.payment.

The method was returning no value (~None) which then blown up when serialised back to XMLRPC. Fixes odoo#22630
  • Loading branch information
qdp-odoo committed Feb 9, 2018
1 parent 20e4cd5 commit 2aabdc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/account/models/account_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ def post(self):
(transfer_credit_aml + transfer_debit_aml).reconcile()

rec.write({'state': 'posted', 'move_name': move.name})
return True

@api.multi
def action_draft(self):
Expand All @@ -519,7 +520,7 @@ def action_validate_invoice_payment(self):
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.
Expand Down

0 comments on commit 2aabdc0

Please sign in to comment.