Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
787 Vizualizări

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? 

Imagine profil
Abandonează
Cel mai bun răspuns

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


Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
iul. 25
2276
2
iul. 25
7749
2
iul. 25
4166
2
iul. 25
3949
2
iun. 25
2550