跳至内容
菜单
此问题已终结
2 回复
2920 查看

We have two warehouses and several products in our system. quantity of products are updated and assigned to these warehouses. Is there any way to find out a specific product is available in which warehouse? for example we have a product named 'testproduct'. I want to see which warehouses have this product using odoo ORM. (in which warehouses quantity of testproduct is not zero). thanks in advance.

形象
丢弃
编写者 最佳答案

I've figured it myself.

product = self.env['product.product'].browse(PRODUCT_ID)
available_qty = product.with_context({'warehouse' : WAREHOUSE_ID}).qty_available
if available_qty <= 0 ...
形象
丢弃
最佳答案

Hi Arian,

You can find that in the inventory report. There you can filter on product, and you'll find all stock locations in the list. In my screenshot below, I have 2 warehouses: M and TT.

There are 11 pieces of the whiteboard in warehouse M and 10 pieces in warehouse TT.


形象
丢弃
编写者

Is there any way to do this using odoo ORMs?

Sorry, that I don't know

相关帖文 回复 查看 活动
0
6月 16
2830
2
7月 22
5047
2
8月 25
434
2
8月 25
2591
2
5月 25
903