As i had created two fields with different relations(res.partner and sale.order.line) in product and i am trying to get the data dynamically after clicking on the first field by using "onchange" but it is not working..type is many2one.
eg:-
xml
<field name="x_pen" class="oe_inline" on_change="onchange_pen(x_pen, parent_id)" />
<field name="x_Total" class="oe_inline" on_change="onchange_pen(x_pen, parent_id)" attrs="{'invisible': ['|', ('x_pen', '=', False),]}" />
and the error shows like this:
AttributeError: 'product.template' object has no attribute 'onchange_pen'