Hi everyone,
I'm quite new to openerp, and I have a small problem with object inheritance.
According to the documentation at
http://doc.openerp.com/developer/2_5_Objects_Fields_Methods/object_inherit.html to create a new object with fields of an existing object we can use _inherit = "existing.object" with _name != _inherit.
I'm trying to create a template of a product, that should have all the columns of a product and a few additional columns.
Here is my model:
Code:
class product_template(osv.osv):
_name = 'variations.product_template'
_inherit = 'product.product'
_description = 'Template'
_columns = {
'name' : fields.char('Name', size=32, required=True),
}
product_template()
and the view
Code:
<tree>
<record>
<field>variations.template.tree</field>
<field>variations.product_template</field>
<field>tree</field>
<field>
<tree>
<field>
</tree>
</field>
</record>
</tree>
As you can see product_template inherits by product.product. The view references my own model, not product.
The problem is that if I open the template tree, it displays a list of products, not the templates. I checked the DB and seems fine, there is a table (empty) for product_template. I can't figure out what is going wrong.
Thanks in advance
Riccardo