How To Add Ribbon To Form View In Odoo 17

CelineGeorge1 2,255 views 7 slides Aug 02, 2024
Slide 1
Slide 1 of 7
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7

About This Presentation

This slide will show that how to add ribbon to form view in Odoo 17. In Odoo, widgets are used to represent show fields, screens, and attributes. We can also define the widget design in the Odoo 17 platform by using rendering templates.


Slide Content

How To Add Ribbon To Form View In Odoo 17 Enterprise

Introduction Enterpr ise This slide will show that how to add ribbon to form view in Odoo 17. In Odoo, widgets are used to represent show fields, screens, and attributes. We can also define the widget design in the Odoo 17 platform by using rendering templates.

Enterprise Here created a custom model patient details and need to show a ribbon for the vaccinated patients. Let’s go to the xml file of the model.

Enterprise we can use ‘web_ribbon’ for the shape in the form view. we can use the attribute for background color like bg_color=’text-bg-success ’ . Also, we can provide the attributes for making ‘invisible,’ ‘readonly’ conditions in the widget. Here we specified invisible condition for the ribbon that the ribbon shows only if the value for the selection field vaccination will be ‘Vaccinated’, ie the patient take vaccination. Then run the pycharm and upgrade the module.

Enterprise Let’s open the patient details and specify the value for the vaccination as ‘ Vaccinated’ .

Enterprise We can customize as per our own needs in the widget such as color, contents, etc. This is how we can add ribbon to form view in Odoo 17 .

For More Info. Check our company website for related blogs and Odoo book. Check our YouTube channel for functional and technical videos in Odoo. Enterprise www.cybrosys.com