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

I need to call Python function of mrp class in delivery slip report in stock.picking. It works if function is in stock_picking class. 

Any help is appreciatable! 

아바타
취소

From the stock.move you can access the manufacturing order using the field: raw_material_production_id or production_id

작성자

Couldn't get you? I need to call Python function which is in mrp class in qweb delivery slip report.

베스트 답변

You just need a recordset of the "mrp.production" object to call the method.

Ex:

production = self.env['mrp.production'].browse(mrp_production_id)
production.mrp_method()


아바타
취소
작성자

How must i give it in qweb in t-call method?

You can call the method in qweb as well.

Ex:

<t t-set="method_data" t-value="o.env['mrp.production'].browse(mrp_production_id).mrp_method()"/>

Now, you can use this method_data as a variable.

작성자

It doesn't work. I don't understand what is the use of mrp_production_id?

관련 게시물 답글 화면 활동
0
8월 25
95
1
8월 25
2044
1
7월 25
2572
2
7월 25
8009
2
7월 25
4457