Adding a field to an existing Model

Adding a custom field to an existing form is a common customization, and it can be done from the user interface, without the need to create a custom module.

For our Library app, we want to add the Is Book Author? flag to the Partner model, to make it easier to list everyone who is a book author.

To do this, in the Settings app, go to the Technical | Database Structure | Models menu item, and look up the res.partner model, with Contacts for Model Description. Click on it to open the corresponding form view, and you will see all the specific details about the Partner model, including the field list:

Now,  ...

Get Odoo 11 Development Essentials - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.