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

I have product id and location id in my hand. Is therer any built in function to get quantity on hand of product in that location. Can any one give some small code to get QOH of product in particular location?

아바타
취소
베스트 답변

Select a product from the refular product list. On the top of the screen under the "More" button, there should be an option "View stock per location" or something similair.

아바타
취소
베스트 답변

Samba, read the get_product_available method from stock/product.py, it gives you the overview of how to get the quantity of a certain product with various criteria.  Specifically for location, you put in {'location': XXX} into the context when you browse or read the product, then you get the qty_available or virtual_available of the read/browse result.

아바타
취소