Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3818 Widoki

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.


Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
mar 18
3750
0
maj 16
6835
4
gru 15
4338
3
mar 15
6153
2
mar 15
9756