Odoo How to develop a workflow in php for the invoice in XML-RPC? -


I try to eudge my invoice of my ecommerce platform. (Php - xml-rpc) invoice has been created but I do not know how to create a workflow to change the situation in Odu.

I found something on the internet but I think it is old and does not work for 'ODU but OpenPoint v6 or 7.

nb: Link:

  // validate invoice resonance "VALIDATE 


$ Conn- & gt; Workflow ('account.invoice', 'invoice_open', $ invoice_id);

Do you have an idea?

Thanks

When I invoice in Odu, my code in XML-RPC

// ************ shipping by service line / *********************** Line $ shipping_account_id; // ID of account 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" = & gt; new xmlrpcval ('service post', ' String '), "volume" = & gt; new xmlrpcval (' 1 ',' double '), "value_uute" => new xmlrpcval ('20', "double");); $ Client = new xmlrpc_client ($ server_url. "/ Xmlrpc / object"); $ Customer & gt; SetSSLVerifyPeer (0); $ Msg = new xmlrpcmsg ('execution'); $ Msg- & gt; AddParam (new xmlrpcval ($ dbname, "string")); $ Msg- & gt; AddParam (new xmlrpcval ($ uid, "int")); $ Msg- & gt; AddParam (new xmlrpcval ($ password, "string")); $ Msg- & gt; Add Appendix (new xmlrpcval ("account.invoice.line", "string")); $ Msg- & gt; AddParam (new xmlrpcval ("create", "string")); $ Msg- & gt; AddParam (new xmlrpcval ($ val, "struct")); $ Response = $ client- & gt; Send ($ msg);

Here is a method I used to make an invoice by an order and I am using 'Odoo'

Create a Public FunctionIvoice Draft () {$ saleId = $ _REQUEST ['Subscription']; $ OERP = new opener (); $ OERPUserId = $ OERP- & gt; Login ($ _ session ['OERP-user name]], $ _SESSION [' OERP-password ']); // $ $ r = $ OERP-> Workflow to confirm workflow ('sale.order', 'order_confirm', $ sales id); $ Result = $ OERP- & gt; Workflow ('sale.order', 'manual_woice', $ sales id); $ Fields = array ('name'); $ ReadName = $ OERP- & gt; Searched (array (array ('id', '=', $ saleId)), 'sale.order', $ fields); $ OrderName = $ readName [0] ['name']; $ Fields = array ('id'); $ Id = $ OERP- & gt; Search (array (array '(' '', '=', $ command name)), 'account.invoice', $ field); $ InvoiceId = $ id [0] ['id']; $ Result = $ OERP-> Workflow ('account.invoice', 'invoice_pain', $ invoice id); Return result; }

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -