问题
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.
来源:https://stackoverflow.com/questions/43422644/how-to-get-available-quantity-of-lot-number