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

Hello, i'm on Odoo 8

I want to get my products and the locations of these products in a SQL query, to put it in a jrxml file (for Jasper report).

What is the link between stock.location and product.product (or product template) ?
I didn't found location_id in product_product or product template. 

I saw this in addons/stock/product.py :

'location_id': fields.dummy(string='Location', relation='stock.location', type='many2one'),

I don't know if i can use this.

아바타
취소
베스트 답변

Hi Thomas: 

This information is stored in stock.quant in Odoo 12. Check whether this same model exists in Odoo 8.

아바타
취소
작성자

Hello, thank you for your answer !

I saw stock quant many times in code but i never understand what it is concretely, can you explain me please?

This is the model used to display the Inventory Report (Inventory > Reporting > Inventory Report). Odoo keeps a track of the reserved qty and the qty on hand by product, company, location in this model.

작성자

I will see this model, thank you !

관련 게시물 답글 화면 활동
18
6월 21
29273
16
1월 21
17445
1
1월 21
8841
0
10월 17
4325
1
5월 16
3824