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
- 회계
- 재고 관리
- PoS
- Project
- MRP
신고된 질문입니다
1
회신
2554
화면
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,
})
관련 게시물 | 답글 | 화면 | 활동 | |
---|---|---|---|---|
|
1
9월 17
|
9613 | ||
|
0
11월 15
|
3297 | ||
|
2
12월 20
|
3119 | ||
|
1
3월 15
|
4952 | ||
|
2
5월 25
|
1040 |