-->

how to get available quantity of Lot number

2019-04-13 03:05发布

问题:

how to get available quantity of Lot number in multiple warehouse

suppose i have 3 warehouse A,B and C, Lot number LOT0001

i want sum of total currently availabel quantity of LOT0001 in all three location.

回答1:

In odoo you can pass filters in context.

ex:

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

product.with_context(context).qty_available

In odoo base module system will automatically calculate quantity based on context.

If you not pass context then system will give you sum of all warehouse stock.

this may help you.