我在一个项目中看到了一段代码,其中写了以下内容:
move = Move.create({
'name': repair.name,
'product_id': repair.product_id.id,
'product_uom': repair.product_uom.id or repair.product_id.uom_id.id,
'product_uom_qty': repair.product_qty,
'partner_id': repair.address_id.id,
'location_id': repair.location_id.id,
'location_dest_id': repair.location_dest_id.id,
'restrict_lot_id': repair.lot_id.id,
})
moves |= move
moves.action_done()
Run Code Online (Sandbox Code Playgroud)
这里的含义是什么意思?
我需要从 odoo 库存中获取可用数量的产品。
我有几个模型stock_quant、stock_move、stock_location。
我想要实现的是两件事:
任何人都可以指导我吗?