跳至内容
菜单
此问题已终结
1 回复
3602 查看

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
11月 24
1801
1
8月 21
2352
1
4月 21
3795
0
4月 21
2292
1
2月 24
2945