Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3578 Prikazi

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
Avatar
Opusti
Best Answer

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


Avatar
Opusti

Hi Muhamed,

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

Thanks & Regards

Related Posts Odgovori Prikazi Aktivnost
1
nov. 24
1789
1
avg. 21
2339
1
apr. 21
3783
0
apr. 21
2273
1
feb. 24
2934