Odoo 12 Development Essentials
上QQ阅读APP看书,第一时间看更新

Modifying an existing model to add a field

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 to-do application, we want to select a group of people that will be able to collaborate on to-do items. We will identify them by setting a flag on their partner form. For that, we will add an Is Work Team? flag to the partner model.

The partner model is part of the Odoo core, and is available even if you haven't installed any apps yet. However, you may not have a menu option available to visit it. A simple way to add one is to install the Contacts application. Open the Apps top menu, look up this application, and install it, if you have not already done so:

After this, the Contacts application top menu option will be available.