Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
863 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
aug. 25
174
1
aug. 25
2127
1
jul. 25
2618
2
jul. 25
8034
2
jul. 25
4516