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.

1

One2Many XMLRPC (C#) Example

By
Cornille Michiel
on 10/6/13, 3:10 PM 3,164 views

Hi all,

I am trying to create a Delivery order by code ( c# ) i am able to generate the Delivery Order but then i get stuck at adding Product lines.

This is the code i have so far:

                    //Login to openerp
                IOpenErpLogin rpcClientLogin = XmlRpcProxyGen.Create<IOpenErpLogin>();
                int userid = rpcClientLogin.login(Properties.Settings.Default.OpenERP_DB, Properties.Settings.Default.OpenERP_User, Properties.Settings.Default.OpenERP_Pass);
                IOpenErp rpcClient = XmlRpcProxyGen.Create<IOpenErp>();

                //Create New Delivery
                XmlRpcStruct addPairFields = new XmlRpcStruct();
                addPairFields.Add("partner_id", lblID.Text);
                addPairFields.Add("move_type", "one");
                //addPairFields.Add("move_lines");
                int resAdd = rpcClient.create(Properties.Settings.Default.OpenERP_DB, userid, Properties.Settings.Default.OpenERP_Pass, "stock.picking.out", "create", addPairFields);
                Console.WriteLine("Added recordid {0}", resAdd);

This is where i get the error: //addPairFields.Add("move_lines");

i know that the move_lines is the field that contains the Items you want to deliver but what data do i pass here? any help or tips are welcome.

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: 10/6/13, 3:10 PM
Seen: 3164 times
Last updated: 3/16/15, 8:10 AM