new-widgets-odoo-13.png
Blogger_636894212542259474.png
By: Nimisha Muralidhar

New Widgets in Odoo 13

Technical Odoo 13

Odoo is known for its simplicity and usability. The open-source right from its inception has been in discussion for its efficient management of different business modules and enhanced collaborative work environment. With each version release, Odoo is becoming more stronger and highly competitive with other ERP solutions in the market. 


The recent version, Odoo 13 has introduced several new modules like Employee Skill Management, Rental Management, promising the most intrinsic management of the business. This blog introduces you to the new widgets introduced in Odoo 13.


Widget is a representation of display screens, fields, and attributes in odoo. It allows us to change the view using different rendering templates and also allows to design as per requirement. Additional widgets are introduced in version 13 so that it can be easily applied.


1. Signature widget (widget="signature" )

A widget is defined for signature, on using this widget one can easily draw the signature. 


Python:

user_signature = fields.Binary(string='Signature') 


XML:

<field name="user_signature" widget="signature"/>

new-widgets-odoo-13-cybrosys



2. Ribbon widget  (<widget name="web_ribbon" text="Paid"/>)

Widget web_ribbon can be used in a form. It displays a ribbon on the top right part of the form. One can specify text in text attribute and background color in the bg_color attribute.


<widget name="web_ribbon" text="Archived" bg_color="bg-danger" />


Let's take an example of invoice payment,


when a customer pays the invoice, a green color ribbon is tied in the corresponding invoice with the status ”paid


<widget name="web_ribbon" text="Paid"/>


If you don’t specify bg_color, by default bg_color will be bg-success.


new-widgets-odoo-13-cybrosys


3. date range widget (widget="daterange" )


date_begin = fields.Datetime( string='Start Date')
<field name="date_begin" widget="daterange"/>


The widget date range can be used for displaying date, month and time in a notable format just as shown below:


new-widgets-odoo-13-cybrosys


4. Many2many avatar widget  (widget="many2many_tags_avatar" ):

Widget many2many_tags_avatar  can be used in a Many2many field. It is similar to many2many_tags, change is the addition of avatar.


Python:

partner_ids = fields.Many2many('res.partner', 'calendar_event_res_partner_rel', string='Attendees')

XML:

<field name="partner_ids" widget="many2many_tags_avatar" write_model="calendar.contacts" write_field="partner_id" avatar_field="image_128"/>


new-widgets-odoo-13-cybrosys


5. Float Rating widget  (widget="field_float_rating" ):    

Widget field_float_rating can be used for displaying rating of a float field.


Python:

rating_avg = fields.Float("Rating Average", compute='_compute_rating_stats')

XML:

<field string="Rating" name="rating_avg" widget="field_float_rating"/>

new-widgets-odoo-13-cybrosys


6. Website publish button widget  (widget="website_publish_button" ):

Widget website_publish_button can be used for showing whether it is published or not on the website.


Python:

is_published = fields.Boolean('Is Published', copy=False)

XML:

<field name="is_published" widget="website_publish_button"/>


new-widgets-odoo-13-cybrosys


7. Website redirect button widget (widget="website_redirect_button" ):   

Widget website_redirect_button can be used for the button where it redirect to website.


Python:

is_published = fields.Boolean('Is Published', copy=False)


XML:

<field name="is_published" widget="website_redirect_button"/>


new-widgets-odoo-13-cybrosys




cybrosys youtube

Comments

0


Leave a comment

 
Calicut

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

London

Cybrosys Limited
Alpha House,
100 Borough High Street, London,
SE1 1LB, United Kingdom

Kochi

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

Bangalore

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

Send Us A Message