Skip to Content
Menú
This question has been flagged
1 Respondre
3619 Vistes

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
Descartar
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
Descartar

Hi Muhamed,

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

Thanks & Regards

Related Posts Respostes Vistes Activitat
1
de nov. 24
1809
1
d’ag. 21
2363
1
d’abr. 21
3816
0
d’abr. 21
2324
1
d’ag. 25
3013