Hi,
I am looking for a working example of inheritance in res.partner.
I just want to add one field for example after the existing field phone.
I have errors like:
Error details: Field `my_field` does not exist
Here after the code i have inside the .py and .xml
from openerp import models, fields class pb_it(models.Model): _inherit = 'res.partner' my_field = fields.Char(string='My Field', size=64)
<?xml version="1.0" encoding="UTF-8"?> <openerp> <data> <record model="ir.ui.view" id="view_res_partner_inherited"> <field name="name">view.res.partner.inherited</field> <field name="model">res.partner</field> <field name="inherit_id" ref="base.view_partner_form" /> <field name="arch" type="xml"> <field name="phone" position="after"> <field name="my_field" /> </field> </field> </record>
</data> </openerp>
Thanks
--------------------------------------------------
Thank you Tarek Mohamed Ibrahim, at the end your answer was the correct one.