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

Hello. I am having trouble trying to add stock to a product in my Odoo using the API. Currently, I am trying to add it to the model "stock.quant" but does not work since it prints this message: "You cannot take products from or deliver products to a location of type "view" (Physical Locations).". I also have tried to use "stock.move.line" with "stock.picking" but since I have to specify source warehouse, I cannot do it. Thanks!

อวตาร
ละทิ้ง
ผู้เขียน

Thank you for your answer! It helped me a lot! I have to be sure that the location is internal. Thanks!

คำตอบที่ดีที่สุด

Hello Garber,

""You cannot take products from or deliver products to a location of type "view" (Physical Locations)."""

Above  validation error occur only, when we try to update stock for location which has usage="view". 

please apply following domain to select location for product on stock.quant to update stock. 

domain="[('usage', 'in', ['internal', 'transit'])]" 


Thanks & Regards,



CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229-1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat



อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ม.ค. 23
7739
1
มี.ค. 22
5547
1
ก.พ. 22
5672
1
ก.ค. 20
9457
1
ม.ค. 24
3819