in view :
product.template.common.form
product.template
in class
class ProductTemplate(models.Model)
_inherit = 'product.template'
remise = fields.Float('remise du fournisseur', size=10, required=True)
marge = fields.Float('marge', size=10, required=True)
total_reste = fields.Float('Reste', size=10, required=True)
example_field = fields.Float('example')
@api.multi
@api.onchange('standard_price','marge')
def onchange_calculer(self):
for s in self:
s.example_field = s.standard_price * (s.marge/100) + s.standard_price
Why u use x_marge1 and x_remise1 on wiew if u arent define in the model ?