in view :
<field name="name">product.template.common.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='list_price']" position="after">
<field name="remise"/><!--this name is how u declared on model, no x_remise1-->
<field name="marge"/><!--this name is how u declared on model, no x_marge1-->
<field name="example_field" />
</xpath>
</field>
</record>
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 ?