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