Enable Dark Mode!
how-to-customize-form-views-in-odoo-20-studio.jpg
By: Anaswara S Sunil

How to Customize Form Views in Odoo 20 Studio

Technical Odoo 20 Studio

The form view is where users spend most of their time in Odoo. Users create contacts, confirm sales orders, edit products, and follow up on records here. Having an efficiently designed form view that contains everything you need in terms of buttons, status, and the conversation history will make all those tasks easier.

With Odoo 20 Studio, you can design the form view visually without any XML/Python coding. In this guide, we will go through the various elements that you can add to the form view – Tabs, Columns, New Pages, Separators, Pipeline Status Bar, Ribbons, Buttons, Smart Buttons, Chatter and Email Alias, Pictures, and the Rainbow Man button effect.

1. Access the Form View in Studio

  • Open your application and the record form you want to edit, e.g., Sales Order.
  • Tap the Studio icon (the wrench) located in the top right corner of the window.

How to Customize Form Views in Odoo 20 Studio-cybrosys

  • From the Views menu, choose Form in Studio, or simply keep the current form view that is opened in Studio.
  • On the left panel, there are the tabs + Add (for components and fields), View (settings for the entire view) and Properties (for settings of the selected element).
How to Customize Form Views in Odoo 20 Studio-cybrosys

In Studio, the views can be classified into general views, multiple-record views, timeline views and reporting views. The form view is a general view used when creating and editing records. Any changes made are saved as Studio-inherited views, so the standard view is not changed.

2. Structure the Form with Tabs and Columns

Tabs and Columns are the two structural elements that Studio provides under Components in the Add tab. Place them on your form for structuring purposes.

Columns

Columns divide a part of the form into columns. It is helpful when the list of fields is long and should be displayed on the left side of the page.

  1. In the Add tab, choose Column under Components.
  2. Place it on the form in the location where the new area is required.
  3. Drag-and-drop existing fields into the left or right column.

How to Customize Form Views in Odoo 20 Studio-cybrosys

Tabs

Tabs let you organize related data under one heading so that your main form looks neat. The order lines, quote generator, additional information, and delivery information will be in separate tabs in the Sales Order form.

  • Drag Tabs from the Add tab to the form.
  • Click the name of the tab to change its name.
  • Drag fields to the tab page.

How to Customize Form Views in Odoo 20 Studio-cybrosys

New Page

For adding an extra page to an already existing group of tabs, click the + button at the end of the tab row. The new empty tab will appear. Give it a name and drag the fields there.

How to Customize Form Views in Odoo 20 Studio-cybrosys

Tip: Place the most important fields above the tabs and the less important fields in the tabs.

3. Add Stages

Stages reflect the current position of a record in the process flow, such as Draft, Confirmed, and Completed. To add stages in Studio, you must add them in the stage bar located on the top right side of the form.

  1. Open the form in Studio.
  2. In the stage bar, click Add Stage.
  3. Then, enter the name of the stage.
  4. Do this for every stage of the process flow and reorder them if necessary.
  5. Edit the name or any other property of a stage by clicking on the stage.

How to Customize Form Views in Odoo 20 Studio-cybrosys

Tip: stages must reflect the actual process steps, and there shouldn’t be too many stages with very descriptive names to keep things simple.

4. Add a New Button

You have the ability to add a button in Studio that will appear on the form itself. Odoo offers two different methods to specify the functionality of this button: either run a server action by choosing a server action from a dropdown menu or call a method that already exists in Odoo.

  1. Click the Add button in the button row at the top of the form.
  2. Enter the Label.
  3. Select what the button will do:
    • Run Server Action: Select the server action you want to perform from the drop-down list.
    • Call Method: Enter the name of the Python method that is defined on your model.
  4. Edit the button by clicking the button on your form and changing its properties.

How to Customize Form Views in Odoo 20 Studio-cybrosys

Primary and secondary buttons

The Primary button symbolizes the primary action that the user can perform in the view, and it is more noticeable than other buttons. The Secondary button provides an option for performing another or less-used action. By default, a newly created button is marked as the secondary button. To change the button label or class, click the button and modify its Label or Class property in the Properties tab: use btn-primary if it is a primary button or btn-secondary if it is a secondary one.

How to Customize Form Views in Odoo 20 Studio-cybrosys

5. Add Smart Buttons

A smart button is positioned at the top of the form, just above the regular button bar, and contains either a count or a value, like the number of relevant deliveries or payments. Clicking it displays the corresponding records.

To create a smart button, you need to click the Add button on the smart button bar at the top of the form (the + sign at the top right corner in newer versions of Studio), and then:

  1. Specify a Label;
  2. Select an Icon;
  3. Specify a related field that allows Studio to determine the records that will be opened when you click the button.

How to Customize Form Views in Odoo 20 Studio-cybrosys

6. Chatter

Chatter is the section of the form where users can post messages, make notes, and plan their activities, keeping the entire discussion linked to the record.

  • Open the form in Studio. The chatter is displayed in a separate panel below the form. Note that it is not a draggable item under Components, as Tabs and Column are the only items listed there.
  • Click the chatter to select it. The Properties tab now contains a single Remove from view button.

How to Customize Form Views in Odoo 20 Studio-cybrosys

  • To remove the chatter, just click on Remove from view. The location will be taken up by the Add Chatter Widget button.
  • For adding the chatter, click on Add Chatter Widget.

How to Customize Form Views in Odoo 20 Studio-cybrosys

7. Add a Picture

The picture field adds a visual element to the record, such as an image of the product, an image of the employee, or even a logo of the company. In the Sales Order form, the Add Picture button in the top right corner is the placeholder for the picture field.

  • Just click on Add Picture in the top right corner of the form, or drag Image under New Fields in the Add tab to the form.

How to Customize Form Views in Odoo 20 Studio-cybrosys

  • Select whether you want to add a new picture field or an existing one.
How to Customize Form Views in Odoo 20 Studio-cybrosys

8. Rainbow Man on Buttons

The Rainbow Man is an animation that appears when the user performs certain actions or clicks specific buttons. It makes the software more interesting and rewarding to work with. The Rainbow Man effect can be added to most buttons in Odoo, like Send by Email, Confirm, and Cancel, by selecting the button in Studio, going to its Properties tab, and enabling the Rainbow Man option.

By default, the effect is already enabled for winning opportunities, emptying the inbox, completing a tour, and reconciliation finishing.

To enable it for your button:

  1. Select the button in Studio you want to edit.
  2. Click the Properties tab and turn on the Rainbow Man option.
  3. Close Studio and click the button on a record to test it.

How to Customize Form Views in Odoo 20 Studio-cybrosys

With the help of Odoo 20 Studio, it becomes easy to develop a good-looking and well-structured form view using drag and drop. Stages, tabs, columns, and even new pages create a structure of the view, while stages, buttons, and smart buttons help navigate through the view. Chatter with an email alias keeps all communication associated with each record, and the Rainbow Man makes key actions more rewarding without coding.

To read more about How to Create a Form View in Odoo 20, refer to our blog, How to Create a Form View in Odoo 20.


Frequently Asked Questions

Is there any need to program a form view customization in Odoo 20 Studio?

No, most of the customizations can be done by drag and drop. The only time you would need an already written Python function is when you use the Call a Method feature of a button.

What is the difference between Run a Server Action and Call a Method?

Running a Server Action will run the server action that you can choose from the drop-down list, while Call a Method will run a Python function that is already defined in Odoo.

How can I add stages in my form?

Click on the Add stage button in the stage bar present at the top right corner of the form and type the name of the stage, and then drag it in the sequence of your process.

Can I highlight a button?

Yes, you can do it by selecting the button and choosing the appropriate class.

If you need any assistance in odoo, we are online, please chat with us.



0
Comments



Leave a comment



WhatsApp