I am a newbie trying to create a product book by inheriting from product object. I have modelled the class as follows
class book( osv.osv):
_name = 'book'
_inherits = {'product.product': 'name_template'}
_columns = {
'isbn': fields.char('ISBN', size=50),
}
Now when i try to inherit a view for this object from the normal product form by doing something like this
<record model="ir.ui.view" id="view_book_form">
<field name="name">test.books.view</field>
<field name="model">book</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="isbn"/>
</field>
</field>
</record>
I get errors saying that onchange event is not there in the new class. How should i achieve this? If i alternately try to use the _inherit tag, things seem to be working fine.