Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
784 Prikazi

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
Opusti
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


Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
jul. 25
2269
2
jul. 25
7747
2
jul. 25
4166
2
jul. 25
3944
2
jun. 25
2545