Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
807 Tampilan

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? 

Avatar
Buang
Jawaban Terbai

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


Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Jul 25
2323
2
Jul 25
7801
2
Jul 25
4202
2
Jul 25
3989
2
Jun 25
2588