콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
3121 화면

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
2994
2
7월 22
5277
2
8월 25
771
2
8월 25
6201
2
5월 25
1121