如何获取批号的可用数量

how to get available quantity of Lot number

如何获取多个仓库Lot number的可用数量

假设我有 3 个仓库 A、B 和 C, 批号 LOT0001

我想要所有三个位置的 LOT0001 当前可用的总数量。

在 odoo 中,您可以在上下文中传递过滤器。

例如:

context={'lot_id':'','owner_id':'','package_id':'','warehouse':'','force_company':'','location':''}

product.with_context(上下文)。qty_available

在odoo基础模块系统中会根据上下文自动计算数量。

如果你不传递上下文,那么系统会给你所有仓库库存的总和。

这可能对您有所帮助。