Hello guys ,
I have have two fields product_uom_qty and x_unitparcarton that i created it in product module and i added it in sale module
I created a third field x_totalunite and i'm trying to make it calculate product_uom_qty * x_unitparcarton
I tried this but it didn't help
@api.onchange('product_uom_qty', 'x_unitparcarton')
def onchange_field(self):
if self.product_uom_qty or self.x_unitparcarton:
self.x_totalunite = self.product_uom_qty * self.x_unitparcarton