Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
4133 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
0
Mar 18
4233
0
Mei 16
7498
4
Des 15
4694
3
Mar 15
6569
2
Mar 15
10426