Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3566 Lượt xem

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
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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


Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks

Hi Muhamed,

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

Thanks & Regards

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 24
1785
1
thg 8 21
2337
1
thg 4 21
3778
0
thg 4 21
2272
1
thg 2 24
2931