Reputation: 85
I've been trying to insert a sales order via Odoo's web API. The requirement of my clients is that he has an excel file and wants to import his sales order into Odoo. The only way I found was via the Web API. I've been reading and reading sadly did not encounter any specific relation on inserting a sales order with his sales details.
Note : The call of Odoo's Web API is written in python 3. I can connect to the Web API, I can view the sales order but sadly I'm not able to insert or rather I do not know the instructions to insert the sales Order and Details
[EDIT] :
id = proxy.execute_kw(self.Cnn.DATABASE, self.Cnn.USERID, self.Cnn.PASSWORD, TableName, 'create', ['name: New Sale Order'])
I request for your aids.
Upvotes: 2
Views: 3566
Reputation: 143
As mentioned before you don't need to use the web API for what you're trying to do.
But this is how to create a sales order/quotation using the Odoo web services API (in PHP)
$new = $models->execute_kw($db, $uid, $password,
'sale.order', 'create',
array(array('partner_id'=> 6,
'payment_term' => 1, //immediate payment
'medium_id' => 1
)));
echo 'created new sale order with id:' . $new;
Upvotes: 4