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:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
1
Balas
2333
Tampilan
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,
})
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
1
Sep 17
|
9242 | ||
|
0
Nov 15
|
3049 | ||
|
2
Des 20
|
2807 | ||
|
1
Mar 15
|
4724 | ||
|
2
Mei 25
|
622 |