跳至内容
菜单
此问题已终结
1 回复
4884 查看

I've an invoice, and want to change it's status from draft to open

I'm using this class: https://github.com/tejastank/openerp-php-connector

So this is my code:

$odoo->workflow('account.invoice', 'invoice_open', 70 );  // 70 is my invoice id

But the result is always false.

This is the workflow method:

 $client = new xmlrpc_client($this->server."object");
        $client->setSSLVerifyPeer(0);
        $client->return_type = 'phpvals';
        
        $msg = new xmlrpcmsg('exec_workflow');
        $msg->addParam(new xmlrpcval($this->database, "string"));  //* database name */
        $msg->addParam(new xmlrpcval($this->uid, "int")); /* useid */
        $msg->addParam(new xmlrpcval($this->password, "string"));/** password */
        $msg->addParam(new xmlrpcval('account.invoice', "string"));/** model name where operation will held * */
        $msg->addParam(new xmlrpcval('invoice_open', "string"));/** method which u like to execute */
        $msg->addParam(new xmlrpcval('70', "int"));/** parameters of the methods with values....  */
        
        $resp = $client->send($msg);

 

I think i'm missing something because all the other functions works great, any advise on this?

 

Thanks.

形象
丢弃
编写者 最佳答案

Ok, i figure it out, this line:

$odoo->workflow('account.invoice', 'invoice_open', 70 );  // 70 is my invoice id

 

Actually works but it doesn't return any indication if the workflow was success or not.

形象
丢弃
相关帖文 回复 查看 活动
1
10月 17
4035
1
9月 21
3596
1
6月 19
4250
2
9月 17
5828
1
6月 16
4312