Reputation: 31
I would like to create an invoice from the picking but trough and XML-RPC call from a PHP file. I have tried to call the action_id: 359 like this:
$transfer = $rpc->button_click($uid, $pwd, 'stock.invoice.onshipping', 'invoice_open', array(111));
But it doesn't work... Do some one have any clue on how can I do this?
Upvotes: 0
Views: 877
Reputation: 2594
Below i am posing the code it may help in your case:
In Php you can try ripcord
library :
For Basic connection setup/authorization just type this code.
$url = "http://localhost:8072";
$db ="my_db";
$username = "[email protected]";
$password = "7859884833";
$common = ripcord::client("$url/xmlrpc/common");
$uid = $common->authenticate($db, $username, $password, array());
echo $uid;//1
Now create a model instance and call the work flow by exec_workflow
:
$models = ripcord::client("$url/xmlrpc/object");
$models->exec_workflow($db, $uid, $password,'account.invoice' ,'invoice_open',14);
Hope this may help in calling the workflow from php.
Upvotes: 1