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

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


頭像
捨棄

Hi Muhamed,

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

Thanks & Regards

相關帖文 回覆 瀏覽次數 活動
1
11月 24
1785
1
8月 21
2337
1
4月 21
3779
0
4月 21
2272
1
2月 24
2931