Odoo Contact (Partners) Tutorials

Contact can be accessed after installing the Contacts module. It is the core Odoo module that manages a company’s address book, be it partner or customer.

Add a custom field to the Contact form

We will create a field to res.partner model by inheriting it and adding the field.

class CustomModuleContact(models.Model):
    _inherit = 'res.partner'

    other_email = fields.Char(string='Other e-mail')

Add the field to view

<record model="ir.ui.view" id="view_module_res_partner_form_inherit">
    <field name="name">module.res.partner.form.inherit</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='vat']" position="after">
            <field name="other_email"/>
        </xpath>
    </field>
</record>

1 thought on “Odoo Contact (Partners) Tutorials”

Leave a Comment

Your email address will not be published. Required fields are marked *


Scroll to Top

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close