Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3561 มุมมอง

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ย. 24
1782
1
ส.ค. 21
2337
1
เม.ย. 21
3778
0
เม.ย. 21
2268
1
ก.พ. 24
2931