تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
3616 أدوات العرض

I want to update the product quantity on hand from python code 
I have tried to use

self.env['stock.quant']._update_available_quantity(product_id, company.internal_transit_location_id, qty)
but quantity doesn't update
الصورة الرمزية
إهمال
أفضل إجابة

Hi,

You can try with the below solution

self.env['stock.quant']._update_available_quantity(product_id, order_id.warehouse_id.lot_stock_id, 100)
Thanks & Regards,
Sunny Sheth


الصورة الرمزية
إهمال
الكاتب

Thanks

Hi Muhamed,

Can you please upvote this answer if you have enough Karma/Points?

Thanks & Regards

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
نوفمبر 24
1809
1
أغسطس 21
2360
1
أبريل 21
3810
0
أبريل 21
2317
1
أغسطس 25
3004