Odoo 15 Studio Book - Creating Models and Adding Fields

We can create new models in Odoo without using codes. This method is very easy and less time consuming. In the studio module we have an option for creating models. This method will help us to create fields in custom modules or already available apps.

odoo-crm

When we click the New Model button, the next step is to add the name of the model.

odoo-crm

Once we add the name, next we have to add the details of models. We can add the features and click create model.

odoo-crm

We have different options for selecting the model.

odoo-crm

For views:

odoo-crm

General views:

1. Form

odoo-crm

We can select different types of components and fields, then drag and drop to the needed places.

odoo-crm

For selecting tabs we have drag and drop the tabs to the model. We can give names and we can set the visibility to groups.

odoo-crm

If we select the column, then we can add a name and we can set the visibility also.

odoo-crm

Under the New fields section different types of fields are there. From these sections we can choose different types of fields.

If we select the fields, under properties, we can change the properties field like invisible, store etc. We can remove fields from models by clicking remove from view. We can set the widget, default value, domain, and visibility to groups.

odoo-crm odoo-crm

Text field: For this field you can set the conditions like invisible, required, read only. You can set the label for the field. You can add help also. Under the widget you can set the format of the field like if it is a text, then it looks like the text field itself. You can set a default value for the field. You can set the visibility to groups also. If you don’t want this field, you can remove it from view.

odoo-crm

In case of view you can create, edit or delete. If you set the field as invisible, here you can enable the invisible element, then we can see it as a shaded portion.

Multiline text: In case of multiline text you can add the text to more than one line.

Integer: You can add the integers, and default always shows it as zero.

Decimal field: You can add the decimal numbers.

HTML: HTML field looks like this.

odoo-crm

Monetary field: If you want to add a monetary field, you have to add the currency field first.

odoo-crm

If you add the currency you can set the domain and context also

odoo-crm odoo-crm

Monetary field always shows the cost and it is a decimal number.

Date, Date and Time: There are two fields available for date and datetime in Odoo models.

Checkbox: Checkbox is a Boolean field, we can enable or disable these fields.

Selection fields: If you add the selection field you have to add the possible values first.

odoo-crm

Then you can edit the values also.

odoo-crm

You can select the values in the given section.

File: You can upload pdf or any attachments over here

odoo-crm

Lines: In lines you can edit the list view and form view also. You can add data as line by line for a single section.

odoo-crm

One 2 Many:

odoo-crm odoo-crm

If you select the one2many field you have to add the relation, then you can edit the form view or list view.

Many2One: If you drag and drop the many2one field, you have to select the relation first like one2many field.

Many2many: For many2many also you have to add the relation first.

Image: If you select the image field, you can add the related images as jpg files. You can also set the size of the image also.

odoo-crm

Tags: Tag itself a many2many field, so you have to add the relation.

Priority: Priority will help to find the priority of data, we can specify the possible values for priority by selecting the edit values.

odoo-crm

Signature: This field used to add the electronic signature, you have an option to autocomplete with contact, phone etc.

odoo-crm

New Related Fields: You can relate fields by drag and drop into the model. Here also you have to select the relation.

Existing Fields: Existing fields are already created fields and if you want to add this into different views, you can drag and drop into particular views.

odoo-crm

Here you can see the product cost is available but which is not shown in Kanban view.

odoo-crm

We have a lot of existing fields are available.

odoo-crm

After add the cost,

odoo-crm

Similarly all fields which are already created available in existing fields. We add these fields into new apps or Odoo available apps also.

whatsapp
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message