Hi guys
Please i want to add some fields in existing class in odoo which is product.template.
Here is my code:
class product_template(models.Model):
#Inhertis the model product.template
_inherit = 'product.template'
_name = 'product.template'
_columns = {
'CostPrice' : fields.float('Buy price'),
'ShippingCost' : fields.float('Shipping Cost'),
'FieldAfterGroup' : fields.char(string='Field After Group'),
'FieldNewPage' : fields.char(string='Field New Page'),
}
--------------------------------------
<record id="view_product_form_inherit" model="ir.ui.view">
<field name="name">product.template.common.form.inherit</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<xpath expr="//page[@string='Information']" position="after">
<page name="Sample" string="Custom page">
<group>
<field name="FieldNewPage"/>
</group>
</page>
</xpath>
<xpath expr="//page[@string='Information']/group" position="after">
<group>
<field name="FieldAfterGroup"/>
</group>
</xpath>
</record>
<record model="ir.ui.view" id="view_product_form_inherit_tree">
<field name="name">product.template.common.form.inherit.tree</field>
<field name="model">product.template</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Services" >
<field name="FieldNewPage"/>
<field name="FieldAfterGroup"/>
</tree>
</field>
</record>
--------------------- I have this error
2015-06-15 09:12:05,111 5222 CRITICAL see-teck openerp.modules.module: 'module' object has no attribute 'integer'
Please help please