Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
4141 Weergaven

I am trying to update some information on my odoo product with PHP and xmlrpc.

This is my code for update product name.

$models->execute_kw($db, $uid, $password, 'product.product', 'write',

array(array(5), array('name'=>"Newer product 3",'type'=>"consu")));

Now I want to change a "Quantity On Hand" field so I trying this code :

$models->execute_kw($db, $uid, $password, 'product.product', 'write',

array(array(5), array('name'=>"Newer product 3",'type'=>"consu",'qty_available'=>'7')));

but it doesn't work, anyone got any ideas how to fix it?

Thank you.


Avatar
Annuleer
Beste antwoord

It is not working because qty_available field is a functional field so it is automatically computed and you can't put values into it.

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
mrt. 18
4243
0
mei 16
7511
4
dec. 15
4696
3
mrt. 15
6579
2
mrt. 15
10439