コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2199 ビュー

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
2043
1
7月 25
2572
2
7月 25
8007
2
7月 25
4457