Skip to Content
Menu
This question has been flagged
1 Atsakyti
899 Rodiniai

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? 

Portretas
Atmesti
Best Answer

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


Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
3
rugs. 25
2676
0
rugp. 25
291
1
rugp. 25
2290
2
liep. 25
8118
2
liep. 25
4557