I get product.product object using the search method. Now I want to update its quantity in a specific warehouse (I have multiple warehouses) using ORM. how can I achieve it?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- सीआरएम
- e-Commerce
- लेखांकन
- इन्वेंटरी
- PoS
- Project
- MRP
This question has been flagged
1
Reply
2365
Views
stock_loc = self.env['stock.warehouse'].search([('name', '=', wh_name)],
limit=1)
product_quant = self.env['stock.quant'].with_context(inventory_mode=True).create({
'product_id': product.id,
'inventory_quantity': quantity,
'location_id': stock_loc.lot_stock_id.id,
})
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
सित॰ 17
|
9303 | ||
|
0
नव॰ 15
|
3089 | ||
|
2
दिस॰ 20
|
2870 | ||
|
1
मार्च 15
|
4757 | ||
|
2
मई 25
|
699 |