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

Hi,


I am quite new to Odoo and I am trying to create custom field on mrp.workorder model. I have no access to server machine.


My new field will be x_productionweight and what I want to calculate is  x_productionweight = qty_production * x_product_weight. How can I do this? 

アバター
破棄
最善の回答

I'm just know to it with python code

something like this

@api.depends('qty_production', 'x_product_weight')

def _compute_x_productionweight(self):

​for r in self:

​r.x_productionweight = r.qty_production * r.x_product_weight


アバター
破棄
関連投稿 返信 ビュー 活動
1
7月 25
2297
2
7月 25
7761
2
7月 25
4185
2
7月 25
3960
2
6月 25
2560