跳至內容
選單
此問題已被標幟
1 回覆
4145 瀏覽次數

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.


頭像
捨棄
最佳答案

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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
3月 18
4250
0
5月 16
7514
4
12月 15
4699
3
3月 15
6580
2
3月 15
10440