I have just created a module and want to add two fields to product module using this code:
<record id="product_product_template_only_form_view" model="ir.ui.view"> <field name="model">product.product</field> <field name="inhert_id" ref="product.product_template_only_form_view" /> <field name="arch" type="xml"> <field name="list_price" position="after"> <field name="boatlength" /> <field name="fuelcapacity" /> </field> </field> </record>
but I get this error:
ParseError: "Wrong value for ir.ui.view.type: 'field'" while parsing file:///C:/Odoo/server/openerp/addons/boatcompany/boatcompany_view.xml:5,
I think it might have something to do with the default view in product.product module but I am not sure where.
This is the class I created:
from openerp.osv import fields, osv
class product_product(osv.osv):
_inhert = "product.product"
_columns = {
"boatlength": fields.char("Boat Length", size=10),
"fuelcapacity": fields.char("Fuel Capacity", size=10),
}
Is this the correct default view?