Skip to Content
Menu
This question has been flagged
3095 Views

How can I please create (Add) a new order line with PHP API, I try this :

$model = 'sale.order.line';

$item = array(  'order_partner_id' => 81889,
                         'order_id' => 437,
                         'product_uom_qty' => 60,
                         'product_id' =>  6  ,
                         'salesman_id' =>  36,
                         'company_id' => 1,
                         'create_uid' => 36                                                                   
                         );

$this->_models->execute_kw($this->_db, $this->_uid, $this->_password, $model, 'create', array( $item ));


but it don't work, error :

Array ( [faultCode] => 4 [faultString] => (u"La recherche en base de donn\xe9es n'a pas les identifiants ('15') et a des identifiants suppl\xe9mentaires (15), cela peut \xeatre caus\xe9 par une incoh\xe9rence de type dans une requ\xeate pr\xe9c\xe9dente ", None) )

Avatar
Discard