This question has been flagged
1 Reply
2972 Views

I'm using the php class described at https://github.com/OpenCode/openerp-php-connector/blob/master/openerp.class.php

I have the following code in my php file:

$rpc->call_function('account.invoice.basic','act_open',array('invoice_id' => $invoice_id))

But the invoice stays at 'draft' state, i don't have any idea why... can anyone help me with this?

Avatar
Discard
Author

I tried also with 'invoice_open' instead of 'act_open', but also that isn't working....

Best Answer

The reason is because invoice_open (or act_open) is not acount.invoice.basic's method (there is no such model as account.invoice.basic anyway). To execute confirm the invoice you need to execute workflow.  In XML RPC it is done via exec_workflow call.  There is one example here: http://pinakinnayi.blogspot.com/2013/04/example-of-xmlrpc-and-openerp.html

Avatar
Discard