Hi,
I've 3 fields :
'units': fields.float('Number of unities'),
'price': fields.float('Price of an Unit),
'total': fields.float('Total', readonly=True),
And a view like this :
<field name="units" nolabel="1" on_change="onchange_calculate()"/>
<field name="price" nolabel="1" on_change="onchange_calculate()"/>
<field name="total" nolabel="1"/>
I need on change of units or price, calculate the Total,
def onchange_calculate(self, cr, uid, ids, context=None):
return {'value': {'total': self.units + self.price}}
but didn't work :(
Help please ?