Hi,
I'm trying to add another column on the Product Tree View by using a module.
However, I'm receiving this error message: except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')
This is what I got so far,
__openerp__.py => I already added 'product' on the 'depends' field.
mymodule.py =>
class custom_products(osv.osv):
_name = "product.product"
_inherit = "product.product"
_columns = {
'asupplier_code': fields.char('Supplier Code',size=32),
}
_defaults = {
'asupplier_code': '-',
}
custom_products();
mymodule_view.xml =>
<record model="ir.ui.view" id="attempt_2_form">
<field name="name">product.product.tree</field>
<field name="model">product.product</field>
<field name="type">tree</field>
<field name="inherit_id" ref="product.product_product_tree_view"/>
<field name="arch" type="xml">
<field name="default_code" position="after">
<field name="assupplier_code"/>
</field>
</field>
</record>
From what I understand, (when trying to create a module that will edit an existing view)
<field name="name">product.product.tree</field> : I got the value from the View Name field
<field name="model">product.product</field> : I got it from the Object field
<field name="inherit_id" ref="product.product_product_tree_view"/> : The ref would be the name of the view that I wish to inherit right?
Is there something wrong with my understanding and code that results with a Invalid XML for View Architecture?
Thanks!
I finally found what's wrong. The field name has an extra 's'.
still not fixed though.