Odoo Help


API account.voucher: pay & reconcile invoice

Benjamin Mampaey
on 12/3/14, 4:22 AM 1,195 views

I have a create on account.voucher with data:

    'partner_id'=>new xmlrpcval($partner_id, "int"),
    'company_id'=>new xmlrpcval($company_id, "int"),
    'type'=>new xmlrpcval('receipt', "string"),
    'account_id'=>new xmlrpcval(1508, "int"),
    'period_id'=>new xmlrpcval(13, "int"),
    'journal_id'=>new xmlrpcval(8, "int"),
    'amount'=>new xmlrpcval($amount, "double"),
    'move_id'=>new xmlrpcval($move_id, "int"),
    'payment_rate'=>new xmlrpcval(1, "int"),
    'payment_rate_currency_id'=>new xmlrpcval(1, "int"),
    'date'=>new xmlrpcval(date('Y-m-d'), "string"),
    'comment'=>new xmlrpcval('Write-Off',"string"),
    'payment_option'=>new xmlrpcval('without_writeoff', "string")

After that, I'm doing a create on account.voucher.line, with following data:

    'partner_id'=>new xmlrpcval($partner_id, "int"),
    'company_id'=>new xmlrpcval($company_id, "int"),
    'voucher_id'=>new xmlrpcval($voucher_id, "int"),
    'amount'=>new xmlrpcval($amount, "double"),
    'type'=>new xmlrpcval('cr', "string"),
    'name'=>new xmlrpcval($invoice_name, "string"),
    'account_id'=>new xmlrpcval(1004, "int"),
    'move_line_id'=>new xmlrpcval($invoice_id, "int")


Now I can see the payment in odoo, but when I want to use the 'proforma_voucher' workflow, nothing happens. Also the 'cancel_voucher' does nothing.

Is there someone with a solution? :)

is there someone with an idea about this issue?

Benjamin Mampaey
on 12/4/14, 2:20 PM

If you can see the payment in Odoo, can you try to perform the workflow from the web on the payment from the API? See if there is any error.

on 12/4/14, 8:34 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 12/3/14, 4:22 AM
Seen: 1195 times
Last updated: 3/16/15, 8:10 AM