We have different types of widgets for different purposes helping us with the simplification of the operations. Widgets are used to make the code easy and user-friendly which will be helpful in the coding as well as programming aspects of the software. In Odoo 14 development we can make use of the different widgets which can be used in the operations of the programming certain specific aspects of the operation. These are tools of simplification that will pave the way for the ease of programming operations.
In this blog, we are going to discuss different widgets that can be applied in the Odoo field.
All the Widget tools that can be used in Odoo are defined along with the index involved with it. In total, we have covered 30 types of widget tools that are used in Odoo throughout this blog. Moreover, the field type of operation of the respective widget along with the illustrator screenshot of the respective widget of operation in the Odoo platform has been defined for a clearer perspective of the operation.
Let's now move on to understand each of the widgets one by one.
- badge
Field Type: Many2one, Selection
<field name="state_id" widget="badge" />
- remaining_days
Field Type: Datetime
<field name="expiration_date" widget="remaining_days"/>
- color_picker
Field Type: Integer
<field name="color" widget="color_picker"/>
- char_emojis / text_emojis
Field Type: Char, Text
<field name="subject" string="Subject" widget="char_emojis"/>
- forecast_widget
Field Type: Float
<field name="forecast_availability" string="Reserved" widget="forecast_widget"/>
- many2one_avatar_employee
Field Type: Many2one
<field name="employee_id" widget="many2one_avatar_employee"/>
- many2one_avatar_employee
Field Type: Many2one
<field name="user_id" widget="many2one_avatar_user"/>
- priority
Field Type: Selection
priority = fields.Selection([('0', 'Normal'),('1', 'Good'),('2', 'Very Good'),('3', 'Excellent')], "Appreciation", default='0')
<field name="priority" widget="priority"/>
- product_discount
Field Type: Float
<field name="discount" string="Disc.%" widget="product_discount"/>
- list_activity
Field Type: One2many
<field name="activity_ids" widget="list_activity"/>
- kanban_activity
Field Type: One2many
<field name="activity_ids" widget="kanban_activity"/>
- account_resequence_widget
Field Type: Text
<field name="preview_moves" widget="account_resequence_widget"/>
- stock_rescheduling_popover
Field Type: Char
<field string=" " name="json_popover" widget="stock_rescheduling_popover"/>
- mrp_should_consume
Field Type: Float
<field name="product_uom_qty" widget="mrp_should_consume" string="To Consume" width="1"/>
- mrp_workorder_popover
Field Type: Char
<field name="json_popover" widget="mrp_workorder_popover" string=" " width="0.1" attrs="{'invisible': [('show_json_popover', '=', False)]}"/>
- popover_widget
Field Type: Char
<field name="json_lead_days_popover" optional="show" nolabel="1" string="Forecast Description" width="10px" widget="popover_widget"/>
- kanban_vat_activity
Field Type: Boolean
<field name="json_activity_data" widget="kanban_vat_activity"/>
- many2one_barcode
Field Type: Many2one
<field name="product_id"context="{'partner_id': parent.partner_id}" widget="many2one_barcode"domain="[('purchase_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
- text
Field Type: Text, Char
<field name="description" widget="text"/>
- many2manyattendee
Field Type: Many2many
<field name="partner_ids" widget="many2manyattendee" placeholder="Select attendees..." context="{'force_email':True}" class="oe_inline"/>
- many2many_tags_avatar
Field Type: Many2many
<field name="partner_ids" widget="many2many_tags_avatar" placeholder="Select attendees..." context="{'force_email':True}" class="oe_inline"/>
- website_urls
Field Type: Char
<field name="regex_url" widget="website_urls" placeholder="e.g. /page"/>
- domain
- Fied Type: Char
<field name="filter_domain" widget="domain"/>
- boolean_favorite
Field Type: Boolean
<field name="is_favorite" widget="boolean_favorite" nolabel="1"/>
- account_hierarchy_selection
Field Type: Many2one
<field name="user_type_id" widget="account_hierarchy_selection"/>
- percentage
Field Type: Float
<field name="percentage" widget="percentage" />
- task_with_hours
Field Type: Many2one
<field name="task_id" widget="task_with_hours" domain="[('project_id', '=', project_id)]"/>
- timesheet_uom_no_toggle
Float Type: Float
<field name="planned_hours" widget="timesheet_uom_no_toggle" sum="Initially Planned Hours" optional="hide"/>
- CopyClipboardChar
Float Type: Char
<field name="link" readonly="1" widget="CopyClipboardChar"/>
- boolean_toggle
Float Type: Boolean
<field name="active" widget="boolean_toggle"/>
- sms_widget
Float Type: Char, Text
<field name="body" widget="sms_widget"/>
- selection_badge
Float Type: Selection
<field name="progression" widget="selection_badge"/>
- timesheet_uom_timer
Float Type: Float
<field name="unit_amount" string="Time Spent" widget="timesheet_uom_timer"/>
- daterange
Float Type: Datetime
<field name="date_end" widget="daterange" nolabel="1" class="oe_inline" options="{'related_start_date': 'date_begin'}"/>
timesheet_uom
Filed Type: timesheet_uom
<field name="unit_amount" widget="timesheet_uom"/>
- pad
Float Type: Char
<field name="description_pad" widget="pad" nolabel="1"/>
- tate_selection
Field Type: Selection
<field name="kanban_state" widget="state_selection"/>
- many2many_checkboxes
Float Type: Many2many
<field name="inbound_payment_method_ids" string="Methods" widget="many2many_checkboxes" attrs="{'invisible': [('type', 'not in', ['bank', 'cash'])]}"/>
- video_preview
Float Type: Char
<field name="embed_code" class="mt-2" widget="video_preview"/>
- res_partner_many2one
Field type: many2one
<field name="partner_id" widget="res_partner_many2one"
context="{'default_name': contact_name,'default_title': title,
'default_street': street,'default_street2': street2,
'default_city': city,'default_state_id': state_id,
'default_zip': zip,'default_country_id': country_id,
'default_function': function,'default_phone': phone,
'default_mobile': mobile,'default_email': email_from,
'default_user_id': user_id,'default_team_id': team_id,
'default_website': website,'show_vat': True}" />
These are the various types of widget tools that are used during the development of the Odoo platform to bring in advanced functionalities of operation to the platform by simplifying the development and programming aspects.
In conclusion, all the 40 types of widget tools that have been described in this blog will be helpful in the operational aspects of the platform. You can read the following blog to have a clear understanding of further other widget tools which have been used and can be used in Odoo: Widgets in Odoo