Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I use XML-RPC in PHP to add a new line into an existing quotation.
It work, i can add product into sale.order.line but it doesn't add the good product, if i add the product that have the id 49 it at he product with the id 45, if i add the product with id 29 it add the product with the id 25. But if i add the product with id 9 it add the good product.
It is very strange, i don't know where to look.
If you have an idea, please share :)
$o_line = array(
'order_id' => new xmlrpcval( $odoo_order_id, 'int'),
'product_id' => new xmlrpcval( $a_mapping_orderlines [ 'product_1' ], 'int'), 'product_uom_qty' => new xmlrpcval( $a_product['quantity'], 'int'), );
$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("sale.order.line", "string"));
$msg->addParam(new xmlrpcval("create", "string"));
$msg->addParam(new xmlrpcval($o_line, "struct"));
$response = $client->send($msg);
$data['log']['order_line'] = 'fail to create order line';
$product_id = $response->value()->scalarval();
$data['log']['order_line'] = 'order line created, id : '.$product_id;
About This Community
This platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 11/22/15, 12:16 AM|
|Seen: 874 times|
|Last updated: 11/23/15, 5:07 AM|