Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
782 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
lug 25
2268
2
lug 25
7746
2
lug 25
4166
2
lug 25
3943
2
giu 25
2545