How can I add custom fields to inherited Models and views when I Tried to add it is throwing an Parse Error solve this
I tried to add like this
In Model
class ResPartner(models.Model):
_name = 'new.customer.model'
_inherit = 'res.partner'
district = fields.Char(string='district', Size=32)
In Xml:
<record id="add_new_partner" model="ir.ui.view"> <field name="name">new.customer.model</field> <field name="model">res.partner</field> <field name="inherit_id" ref="base.view_partner_form"/> <field name="arch" type="xml"> <xpath expr="//field[@name='country_id']" position="after"> <field name="district" placeholder="district"/> <xpath/> </field> </record>