Odoo Help

Welcome!

This community 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.

0

invoice_open with php

By
Benjamin Mampaey
on 12/2/14, 3:25 PM 657 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?

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

Benjamin Mampaey
on 12/2/14, 3:39 PM
2

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 12/2/14, 7:30 PM

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

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/2/14, 3:25 PM
Seen: 657 times
Last updated: 3/16/15, 8:10 AM