I try to push my invoice of my ecommerce platform to odoo. (php - xml-rpc) The invoice is created but I haven't find how to create a workflow to change the status in Odoo.
I found something on internet but I think it's for old and it' doesn't work for Odoo but OpenERP v6 or 7.
nb : the link : http://goo.gl/lBPWnG
//validate the invoice
echo "VALIDATE<BR /><BR />";
$conn->workflow('account.invoice', 'invoice_open', $invoice_id);
Do you have an idea ?
Thank you
My code in XML-RPC when I create an invoice in Odoo.
// **********************************
// Write a new concerning the shipping by the service line
// **********************************
// invoice line
$shipping_account_id; // id ofaccount shipping 626000
$val = array (
"invoice_id" => new xmlrpcval($invoice_id, "int"),
"account_id" => new xmlrpcval($shipping_account_id, "int"),
"company_id" => new xmlrpcval($company_id, "int"),
"product_id" => new xmlrpcval($odoo_products_id, "string"),
"name" => new xmlrpcval('Service postale', "string"),
"quantity" => new xmlrpcval('1',"double"),
"price_unit" => new xmlrpcval('20',"double"),
);
$client = new xmlrpc_client($server_url . "/xmlrpc/object");
$client->setSSLVerifyPeer(0);
$msg = new xmlrpcmsg('execute');
$msg->addParam(new xmlrpcval($dbname, "string"));
$msg->addParam(new xmlrpcval($uid, "int"));
$msg->addParam(new xmlrpcval($password, "string"));
$msg->addParam(new xmlrpcval("account.invoice.line", "string"));
$msg->addParam(new xmlrpcval("create", "string"));
$msg->addParam(new xmlrpcval($val, "struct"));
$response = $client->send($msg);