SlideShare a Scribd company logo
How to make a field
widget in odoo 17
Enterprise
Introduction
Enterprise
In this slide we’ll discuss on how to create and override existing
field widget in odoo 17. Custom field widgets allow developers to
enhance user interfaces by adding tailored functionality or
altering the behavior of default widgets. By understanding how
to create and modify these widgets, we can provide more
dynamic and intuitive user experiences. We will explore the steps
involved in defining custom widgets and overriding existing ones
using the updated Owl framework in Odoo 17.
Enterprise
Here we can see an example of creating the count widget which
counts the number of order lines in sale orderline. Initially we
can inherit sale order and add fields to compute the order line
count.
Enterprise
Next, we can add the js file for this field widget. In the JS file, we define
two components: OrderLine Count Popover and OrderLine Count
Widget. The OrderLine Count Widget component renders an icon that,
when clicked, opens a popover displaying the order line count. The
OrderLine Count Popover component is responsible for rendering the
popover content.
Enterprise
Enterprise
The XML template defines the structure and layout of the widget,
including the icon and the popover content.
Enterprise
Enterprise
Now we can add the count widget in odoo’s views by modifying the
XML view definition for the sale order tree view
Enterprise
After defining all files, we can add these files in the manifest file.
Enterprise
After upgrading the module, if we go to the sales module, we can
see the icon added to the tree view and also if we click on it, it will
display the total number of orderliness in that sale order
Enterprise
Next, we can see how to override an existing widget. For that we
can add the code to override the JavaScript file for the Orderline
widget in POS. Here, we patch the Orderline widget to include
additional functionality for discount button.
Enterprise
We override the widget for the Orderline when applying a discount. If
the discount exceeds 50%, a confirmation popup should appear to
verify the discount. To achieve this, we import the Confirm Popup
widget. We then override the set_discount() method, which is
responsible for setting the product discount, to include the
confirmation logic.
Enterprise
After choosing products and if we give discount more than 50%,
this popup will be shown for confirmation. This is how we
override an existing widget.
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
Ad

More Related Content

Similar to How to make a field widget in odoo 17 - Odoo Slides (20)

Salesforce crm projects
Salesforce crm projects Salesforce crm projects
Salesforce crm projects
Advanz Knowledge Systems P Ltd
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
Celine George
 
HTML Editor in Odoo 18 - Odoo 18 Technical Slides
HTML Editor in Odoo 18 - Odoo 18 Technical SlidesHTML Editor in Odoo 18 - Odoo 18 Technical Slides
HTML Editor in Odoo 18 - Odoo 18 Technical Slides
Celine George
 
How to Add Custom Fields to Configuration Settings in Odoo 17
How to Add Custom Fields to Configuration Settings in Odoo 17How to Add Custom Fields to Configuration Settings in Odoo 17
How to Add Custom Fields to Configuration Settings in Odoo 17
Celine George
 
How to modify_create components control buttons in Pos odoo.pptx
How to modify_create components control buttons in Pos odoo.pptxHow to modify_create components control buttons in Pos odoo.pptx
How to modify_create components control buttons in Pos odoo.pptx
Celine George
 
HTML Widgets For Search
HTML Widgets For SearchHTML Widgets For Search
HTML Widgets For Search
Jayesh Bhoyar
 
How to Create & Configure Server Actions in the Odoo 18
How to Create & Configure Server Actions in the Odoo 18How to Create & Configure Server Actions in the Odoo 18
How to Create & Configure Server Actions in the Odoo 18
Celine George
 
How to hide the buttons on the POS screen in Odoo 17
How to hide the buttons on the POS screen in Odoo 17How to hide the buttons on the POS screen in Odoo 17
How to hide the buttons on the POS screen in Odoo 17
Celine George
 
How To Create Record From Code In Odoo 17
How To Create Record From Code In Odoo 17How To Create Record From Code In Odoo 17
How To Create Record From Code In Odoo 17
Celine George
 
Embellish bureau
Embellish bureauEmbellish bureau
Embellish bureau
siraj10
 
The EffiChange XPager Suite: Understanding XPages Scaffolding
The EffiChange XPager Suite: Understanding XPages ScaffoldingThe EffiChange XPager Suite: Understanding XPages Scaffolding
The EffiChange XPager Suite: Understanding XPages Scaffolding
EffiChange LLC
 
New Features in Odoo 17 Website Module - Odoo 17 Slides
New Features in Odoo 17 Website Module - Odoo 17 SlidesNew Features in Odoo 17 Website Module - Odoo 17 Slides
New Features in Odoo 17 Website Module - Odoo 17 Slides
Celine George
 
How to Render Dynamic Data using RPC call in Odoo 17 POS
How to Render Dynamic Data using RPC call in Odoo 17 POSHow to Render Dynamic Data using RPC call in Odoo 17 POS
How to Render Dynamic Data using RPC call in Odoo 17 POS
Celine George
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
Celine George
 
How to Create an App Using Odoo 17 Studio
How to Create an App Using Odoo 17 StudioHow to Create an App Using Odoo 17 Studio
How to Create an App Using Odoo 17 Studio
Celine George
 
How to add button in list view Odoo 17 - Odoo 17 Slides
How to add button in list view Odoo 17 - Odoo 17 SlidesHow to add button in list view Odoo 17 - Odoo 17 Slides
How to add button in list view Odoo 17 - Odoo 17 Slides
Celine George
 
Epic net content
Epic net contentEpic net content
Epic net content
Harry Rorarius
 
Banner ads manager magento extension
Banner ads manager magento extensionBanner ads manager magento extension
Banner ads manager magento extension
NETBASE CMSMART
 
Bit2win 20r3.0 release pack
Bit2win 20r3.0 release packBit2win 20r3.0 release pack
Bit2win 20r3.0 release pack
Giacinto Mozzetta
 
2019 ottobre 28 english gdoox personal profile
2019 ottobre 28 english gdoox personal profile2019 ottobre 28 english gdoox personal profile
2019 ottobre 28 english gdoox personal profile
Daniel Rueda H
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
Celine George
 
HTML Editor in Odoo 18 - Odoo 18 Technical Slides
HTML Editor in Odoo 18 - Odoo 18 Technical SlidesHTML Editor in Odoo 18 - Odoo 18 Technical Slides
HTML Editor in Odoo 18 - Odoo 18 Technical Slides
Celine George
 
How to Add Custom Fields to Configuration Settings in Odoo 17
How to Add Custom Fields to Configuration Settings in Odoo 17How to Add Custom Fields to Configuration Settings in Odoo 17
How to Add Custom Fields to Configuration Settings in Odoo 17
Celine George
 
How to modify_create components control buttons in Pos odoo.pptx
How to modify_create components control buttons in Pos odoo.pptxHow to modify_create components control buttons in Pos odoo.pptx
How to modify_create components control buttons in Pos odoo.pptx
Celine George
 
HTML Widgets For Search
HTML Widgets For SearchHTML Widgets For Search
HTML Widgets For Search
Jayesh Bhoyar
 
How to Create & Configure Server Actions in the Odoo 18
How to Create & Configure Server Actions in the Odoo 18How to Create & Configure Server Actions in the Odoo 18
How to Create & Configure Server Actions in the Odoo 18
Celine George
 
How to hide the buttons on the POS screen in Odoo 17
How to hide the buttons on the POS screen in Odoo 17How to hide the buttons on the POS screen in Odoo 17
How to hide the buttons on the POS screen in Odoo 17
Celine George
 
How To Create Record From Code In Odoo 17
How To Create Record From Code In Odoo 17How To Create Record From Code In Odoo 17
How To Create Record From Code In Odoo 17
Celine George
 
Embellish bureau
Embellish bureauEmbellish bureau
Embellish bureau
siraj10
 
The EffiChange XPager Suite: Understanding XPages Scaffolding
The EffiChange XPager Suite: Understanding XPages ScaffoldingThe EffiChange XPager Suite: Understanding XPages Scaffolding
The EffiChange XPager Suite: Understanding XPages Scaffolding
EffiChange LLC
 
New Features in Odoo 17 Website Module - Odoo 17 Slides
New Features in Odoo 17 Website Module - Odoo 17 SlidesNew Features in Odoo 17 Website Module - Odoo 17 Slides
New Features in Odoo 17 Website Module - Odoo 17 Slides
Celine George
 
How to Render Dynamic Data using RPC call in Odoo 17 POS
How to Render Dynamic Data using RPC call in Odoo 17 POSHow to Render Dynamic Data using RPC call in Odoo 17 POS
How to Render Dynamic Data using RPC call in Odoo 17 POS
Celine George
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
Celine George
 
How to Create an App Using Odoo 17 Studio
How to Create an App Using Odoo 17 StudioHow to Create an App Using Odoo 17 Studio
How to Create an App Using Odoo 17 Studio
Celine George
 
How to add button in list view Odoo 17 - Odoo 17 Slides
How to add button in list view Odoo 17 - Odoo 17 SlidesHow to add button in list view Odoo 17 - Odoo 17 Slides
How to add button in list view Odoo 17 - Odoo 17 Slides
Celine George
 
Banner ads manager magento extension
Banner ads manager magento extensionBanner ads manager magento extension
Banner ads manager magento extension
NETBASE CMSMART
 
2019 ottobre 28 english gdoox personal profile
2019 ottobre 28 english gdoox personal profile2019 ottobre 28 english gdoox personal profile
2019 ottobre 28 english gdoox personal profile
Daniel Rueda H
 

More from Celine George (20)

How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
How to Configure Scheduled Actions in odoo 18
How to Configure Scheduled Actions in odoo 18How to Configure Scheduled Actions in odoo 18
How to Configure Scheduled Actions in odoo 18
Celine George
 
How to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 SalesHow to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 Sales
Celine George
 
How to Add Customer Note in Odoo 18 POS - Odoo Slides
How to Add Customer Note in Odoo 18 POS - Odoo SlidesHow to Add Customer Note in Odoo 18 POS - Odoo Slides
How to Add Customer Note in Odoo 18 POS - Odoo Slides
Celine George
 
How to Create A Todo List In Todo of Odoo 18
How to Create A Todo List In Todo of Odoo 18How to Create A Todo List In Todo of Odoo 18
How to Create A Todo List In Todo of Odoo 18
Celine George
 
Link your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRMLink your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRM
Celine George
 
How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18
Celine George
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
How to Manage a Customer Account in Odoo 17 Sales
How to Manage a Customer Account in Odoo 17 SalesHow to Manage a Customer Account in Odoo 17 Sales
How to Manage a Customer Account in Odoo 17 Sales
Celine George
 
How to Open a Wizard When Clicking on the Kanban Tile in Odoo 18
How to Open a Wizard When Clicking on the Kanban Tile in Odoo 18How to Open a Wizard When Clicking on the Kanban Tile in Odoo 18
How to Open a Wizard When Clicking on the Kanban Tile in Odoo 18
Celine George
 
How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
How to Configure Scheduled Actions in odoo 18
How to Configure Scheduled Actions in odoo 18How to Configure Scheduled Actions in odoo 18
How to Configure Scheduled Actions in odoo 18
Celine George
 
How to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 SalesHow to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 Sales
Celine George
 
How to Add Customer Note in Odoo 18 POS - Odoo Slides
How to Add Customer Note in Odoo 18 POS - Odoo SlidesHow to Add Customer Note in Odoo 18 POS - Odoo Slides
How to Add Customer Note in Odoo 18 POS - Odoo Slides
Celine George
 
How to Create A Todo List In Todo of Odoo 18
How to Create A Todo List In Todo of Odoo 18How to Create A Todo List In Todo of Odoo 18
How to Create A Todo List In Todo of Odoo 18
Celine George
 
Link your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRMLink your Lead Opportunities into Spreadsheet using odoo CRM
Link your Lead Opportunities into Spreadsheet using odoo CRM
Celine George
 
How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18
Celine George
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
How to Manage a Customer Account in Odoo 17 Sales
How to Manage a Customer Account in Odoo 17 SalesHow to Manage a Customer Account in Odoo 17 Sales
How to Manage a Customer Account in Odoo 17 Sales
Celine George
 
How to Open a Wizard When Clicking on the Kanban Tile in Odoo 18
How to Open a Wizard When Clicking on the Kanban Tile in Odoo 18How to Open a Wizard When Clicking on the Kanban Tile in Odoo 18
How to Open a Wizard When Clicking on the Kanban Tile in Odoo 18
Celine George
 
Ad

Recently uploaded (20)

Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Grade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable WorksheetGrade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable Worksheet
Sritoma Majumder
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Ranking_Felicidade_2024_com_Educacao_Marketing Educacional_V2.pdf
Ranking_Felicidade_2024_com_Educacao_Marketing Educacional_V2.pdfRanking_Felicidade_2024_com_Educacao_Marketing Educacional_V2.pdf
Ranking_Felicidade_2024_com_Educacao_Marketing Educacional_V2.pdf
Rafael Villas B
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.
MCH
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Operations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdfOperations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdf
Arab Academy for Science, Technology and Maritime Transport
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
National Information Standards Organization (NISO)
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx   quiz by Ridip HazarikaTHE STG QUIZ GROUP D.pptx   quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
Ridip Hazarika
 
Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...
Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...
Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...
TechSoup
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Contact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: OptometryContact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: Optometry
MushahidRaza8
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Grade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable WorksheetGrade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable Worksheet
Sritoma Majumder
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Ranking_Felicidade_2024_com_Educacao_Marketing Educacional_V2.pdf
Ranking_Felicidade_2024_com_Educacao_Marketing Educacional_V2.pdfRanking_Felicidade_2024_com_Educacao_Marketing Educacional_V2.pdf
Ranking_Felicidade_2024_com_Educacao_Marketing Educacional_V2.pdf
Rafael Villas B
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.
MCH
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx   quiz by Ridip HazarikaTHE STG QUIZ GROUP D.pptx   quiz by Ridip Hazarika
THE STG QUIZ GROUP D.pptx quiz by Ridip Hazarika
Ridip Hazarika
 
Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...
Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...
Drive Supporter Growth from Awareness to Advocacy with TechSoup Marketing Ser...
TechSoup
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Contact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: OptometryContact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: Optometry
MushahidRaza8
 
Ad

How to make a field widget in odoo 17 - Odoo Slides

  • 1. How to make a field widget in odoo 17 Enterprise
  • 2. Introduction Enterprise In this slide we’ll discuss on how to create and override existing field widget in odoo 17. Custom field widgets allow developers to enhance user interfaces by adding tailored functionality or altering the behavior of default widgets. By understanding how to create and modify these widgets, we can provide more dynamic and intuitive user experiences. We will explore the steps involved in defining custom widgets and overriding existing ones using the updated Owl framework in Odoo 17.
  • 3. Enterprise Here we can see an example of creating the count widget which counts the number of order lines in sale orderline. Initially we can inherit sale order and add fields to compute the order line count.
  • 4. Enterprise Next, we can add the js file for this field widget. In the JS file, we define two components: OrderLine Count Popover and OrderLine Count Widget. The OrderLine Count Widget component renders an icon that, when clicked, opens a popover displaying the order line count. The OrderLine Count Popover component is responsible for rendering the popover content.
  • 6. Enterprise The XML template defines the structure and layout of the widget, including the icon and the popover content.
  • 8. Enterprise Now we can add the count widget in odoo’s views by modifying the XML view definition for the sale order tree view
  • 9. Enterprise After defining all files, we can add these files in the manifest file.
  • 10. Enterprise After upgrading the module, if we go to the sales module, we can see the icon added to the tree view and also if we click on it, it will display the total number of orderliness in that sale order
  • 11. Enterprise Next, we can see how to override an existing widget. For that we can add the code to override the JavaScript file for the Orderline widget in POS. Here, we patch the Orderline widget to include additional functionality for discount button.
  • 12. Enterprise We override the widget for the Orderline when applying a discount. If the discount exceeds 50%, a confirmation popup should appear to verify the discount. To achieve this, we import the Confirm Popup widget. We then override the set_discount() method, which is responsible for setting the product discount, to include the confirmation logic.
  • 13. Enterprise After choosing products and if we give discount more than 50%, this popup will be shown for confirmation. This is how we override an existing widget.
  • 14. 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