How to apply payment to Invoice via XML-RPC?
I'm trying to import invoices from our website into OpenERP via XML-RPC and PHP.
I managed to create an invoice an validate it. The problem comes when applying payment to the invoice: I'm not sure what's the proper way to "pay" that invoice.
The steps I've followed till now are:
- Create invoice
- Create invoice lines
- Open Invoice
- Create Voucher related to Invoice's move_id
- Create Voucher line
The entries are correctly created, however the payment stays in 'draft' state and never shows up at the invoice.
I've seen that the next step in the account.invoice workflow is "Paid", but I can't make it work. The requirement for this transition is "test_paid()" and the trigger model is account.move.line, but I don't know exactly how to trigger this action.
I've also tried with account.voucher workflow, but "proforma_voucher" action has no effect on the draft voucher
Any ideas about what can be wrong? Am I missing something?