SlideShare a Scribd company logo
Client Actions In Odoo 17
Enterprise
Introduction
Enterprise
In Odoo, a client action refers to a set of actions or operations
that are executed on the client side of the application. Odoo is an
open-source ERP (Enterprise Resource Planning) and business
management software, and it uses a client-server architecture.
The client-side actions in Odoo are typically defined using
JavaScript and XML. OWL is primarily used for representing and
reasoning about knowledge in a machine-readable way.
However, the mention of web frameworks, services, core
components, and hooks suggests a broader context, possibly
related to web development.
Enterprise
● Basic XML menu items use matching widget actions to
make up for client activities.
● Here, we'll look at how to add a menu to the sales order
menu.
● Selecting the sales orders, displaying them, and putting
them to use.
Enterprise
● Add a menu to the views/views.xml file in the directory of
the view to continue.
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--Action to show the Dashboard-->
<record id="advanced_dashboard_action"model="ir.actions.client">
<field name="name">Advanced Dashboard</field>
<field name="tag">advanced_dashboard</field>
</record>
<!--Menu Item to show the dashboard menu in the module-->
<menuitem name="Dashboards" id="advanced_dashboard_menu"
sequence="1" action="advanced_dashboard_action"/>
</odoo>
Enterprise
● when we create a Dashboard action (name to be
determined) to the ir.actions.client model.
● When the menu was clicked, the advanced_dashboard tag
—which is utilized in the widget to load or call the action
stated in the widget—was also added.
● With the aid of this tag, the widget's suggested action (JS
file) will be loaded or called.
Enterprise
/** @odoo-module */
import { registry} from '@web/core/registry';
import { useService } from "@web/core/utils/hooks";
const { Component, mount} = owl
export class AdvancedDashboard extends Component {
setup(){this.action = useService("action");
this.rpc = this.env.services.rpc}
loadData(){
let self = this;
rpc.query({model: 'partner.dashboard',
method: 'get_values', args:[]
}).then(function(data){
console.log(data, 'dataaaa')
self.AdvancedDashboard.data = data;
});
}}
AdvancedDashboard.template = "client_action.advanced_dashboard"
registry.category("actions").add("advanced_dashboard", AdvancedDashboard)
Enterprise
● We are extending the Component class to create the widget. I have
specified a template (Advanced Dashboard) that will be displayed
when this activity is carried out.
● The template (advanced_dashboard), which is subsequently added
to the main Template's table view class (Advanced Dashboard),
receives the data by using the load data method from the start
function to retrieve it from the Python code.
● It is now necessary to specify the Python function file and the
qweb template that the RPC will use. Thus, we going to begin by
generating a models/filename.py Python file.
Enterprise
from odoo import api, fields, models
class EmployeeDashboard(models.Model):
_name = 'partner.dashboard'
_description = 'Partner Dashboard'
user_id = fields.Many2one('res.users', string='Users')
name = fields.Char(string='Partner Name')
@api.model
def get_values(self):
data = self.env['partner.dashboard'].search([])
# we can add the values to the dashboard
return data.read()
Enterprise
Some keywords used by the client actions:
● tag: it refers to a unique identifier or key assigned to a
specific action or event on the client side of a software
application.
● params (optional): In Python, a dictionary is a suitable data
structure for representing key-value pairs, making it
convenient for sending structured data.
Enterprise
● target (optional):
1. Open in the main content area (current): This implies that
the client action should be displayed within the main
content area of the application. It's the default behavior if
the display mode is not explicitly specified.
2. Open in full-screen mode (fullscreen): This suggests that
the client action should take up the entire screen when
executed.
3. Open in a dialog/popup (new): This indicates that the
client action should be displayed in a separate dialog or
popup window.
Enterprise
The template should be defined first (in static/src/xml)
<?xml version="1.0" encoding="UTF-8"?>
<!-- Template for the Advanced Dashboard -->
<templates id="template" xml:space="preserve">
<t t-name="client_action.advanced_dashboard">
<div>
<span>Test Case</span>
<h1><center><span>Partner Details</span></center></h1>
</div>
<!-- You can add the templates here→
</t>
</templates>
Enterprise
And the last one, we can add those files in the __manifest__.py
like this format
'data': [
'views/client_action_views.xml'
],
'assets': {
'web.assets_backend': [
'client_action/static/src/js/client_action.js',
'client_action/static/src/xml/client_action.xml'
],
},
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 Client Actions In Odoo 17 - Odoo 17 Slides (20)

7\9 SSIS 2008R2_Training - Script Task
7\9 SSIS 2008R2_Training - Script Task7\9 SSIS 2008R2_Training - Script Task
7\9 SSIS 2008R2_Training - Script Task
Pramod Singla
 
Build Your Own Angular Component Library
Build Your Own Angular Component LibraryBuild Your Own Angular Component Library
Build Your Own Angular Component Library
Carlo Bonamico
 
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Codemotion
 
Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
Angular2 + rxjs
Angular2 + rxjsAngular2 + rxjs
Angular2 + rxjs
Christoffer Noring
 
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocialIBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connections Developers
 
JMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocialJMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocial
Ryan Baxter
 
How to make a component and add it to systray in Odoo
How to make a component and add it to systray in OdooHow to make a component and add it to systray in Odoo
How to make a component and add it to systray in Odoo
Celine George
 
E-Bazaar
E-BazaarE-Bazaar
E-Bazaar
ayanthi1
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
Pushkar Chivate
 
How Owl.js Masterfully Blends React and Vue Awesomeness in odoo
How Owl.js Masterfully Blends React and Vue Awesomeness in odooHow Owl.js Masterfully Blends React and Vue Awesomeness in odoo
How Owl.js Masterfully Blends React and Vue Awesomeness in odoo
Celine George
 
TangoWithDjango - ch8
TangoWithDjango - ch8TangoWithDjango - ch8
TangoWithDjango - ch8
Asika Kuo
 
Django
DjangoDjango
Django
Harmeet Lamba
 
ANGULAR JS LAB MANUAL(final) vtu2021 sch
ANGULAR JS LAB MANUAL(final) vtu2021 schANGULAR JS LAB MANUAL(final) vtu2021 sch
ANGULAR JS LAB MANUAL(final) vtu2021 sch
kannikadg
 
How to Create a Dynamic Snippet in Odoo 17
How to Create a Dynamic Snippet in Odoo 17How to Create a Dynamic Snippet in Odoo 17
How to Create a Dynamic Snippet in Odoo 17
Celine George
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
Monir Zzaman
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
Professional Guru
 
Top 10 Techniques For React Performance Optimization in 2022.pptx
Top 10 Techniques For React Performance Optimization in 2022.pptxTop 10 Techniques For React Performance Optimization in 2022.pptx
Top 10 Techniques For React Performance Optimization in 2022.pptx
BOSC Tech Labs
 
Google Cloud Platform
Google Cloud Platform Google Cloud Platform
Google Cloud Platform
Francesco Marchitelli
 
Building workflow solution with Microsoft Azure and Cloud | Integration Monday
Building workflow solution with Microsoft Azure and Cloud | Integration MondayBuilding workflow solution with Microsoft Azure and Cloud | Integration Monday
Building workflow solution with Microsoft Azure and Cloud | Integration Monday
BizTalk360
 
7\9 SSIS 2008R2_Training - Script Task
7\9 SSIS 2008R2_Training - Script Task7\9 SSIS 2008R2_Training - Script Task
7\9 SSIS 2008R2_Training - Script Task
Pramod Singla
 
Build Your Own Angular Component Library
Build Your Own Angular Component LibraryBuild Your Own Angular Component Library
Build Your Own Angular Component Library
Carlo Bonamico
 
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Carlo Bonamico, Sonia Pini - So you want to build your (Angular) Component Li...
Codemotion
 
Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocialIBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connections Developers
 
JMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocialJMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocial
Ryan Baxter
 
How to make a component and add it to systray in Odoo
How to make a component and add it to systray in OdooHow to make a component and add it to systray in Odoo
How to make a component and add it to systray in Odoo
Celine George
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
Pushkar Chivate
 
How Owl.js Masterfully Blends React and Vue Awesomeness in odoo
How Owl.js Masterfully Blends React and Vue Awesomeness in odooHow Owl.js Masterfully Blends React and Vue Awesomeness in odoo
How Owl.js Masterfully Blends React and Vue Awesomeness in odoo
Celine George
 
TangoWithDjango - ch8
TangoWithDjango - ch8TangoWithDjango - ch8
TangoWithDjango - ch8
Asika Kuo
 
ANGULAR JS LAB MANUAL(final) vtu2021 sch
ANGULAR JS LAB MANUAL(final) vtu2021 schANGULAR JS LAB MANUAL(final) vtu2021 sch
ANGULAR JS LAB MANUAL(final) vtu2021 sch
kannikadg
 
How to Create a Dynamic Snippet in Odoo 17
How to Create a Dynamic Snippet in Odoo 17How to Create a Dynamic Snippet in Odoo 17
How to Create a Dynamic Snippet in Odoo 17
Celine George
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
Monir Zzaman
 
Top 10 Techniques For React Performance Optimization in 2022.pptx
Top 10 Techniques For React Performance Optimization in 2022.pptxTop 10 Techniques For React Performance Optimization in 2022.pptx
Top 10 Techniques For React Performance Optimization in 2022.pptx
BOSC Tech Labs
 
Building workflow solution with Microsoft Azure and Cloud | Integration Monday
Building workflow solution with Microsoft Azure and Cloud | Integration MondayBuilding workflow solution with Microsoft Azure and Cloud | Integration Monday
Building workflow solution with Microsoft Azure and Cloud | Integration Monday
BizTalk360
 

More from Celine George (20)

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
 
Ledger Posting in odoo Continental Accounting
Ledger Posting in odoo Continental AccountingLedger Posting in odoo Continental Accounting
Ledger Posting in odoo Continental Accounting
Celine George
 
How to Create & Manage a New User Menu in Odoo 18
How to Create & Manage a New User Menu in Odoo 18How to Create & Manage a New User Menu in Odoo 18
How to Create & Manage a New User Menu in Odoo 18
Celine George
 
How to Add Customer Rating Mixin in the Odoo 18
How to Add Customer Rating Mixin in the Odoo 18How to Add Customer Rating Mixin in the Odoo 18
How to Add Customer Rating Mixin in the Odoo 18
Celine George
 
How To Open The Form View Of Many2many Clicking Tag In Odoo 18
How To Open The Form View Of Many2many Clicking Tag In Odoo 18How To Open The Form View Of Many2many Clicking Tag In Odoo 18
How To Open The Form View Of Many2many Clicking Tag In Odoo 18
Celine George
 
The Types of Charts in Odoo 18 Spreadsheet
The Types of Charts in Odoo 18 SpreadsheetThe Types of Charts in Odoo 18 Spreadsheet
The Types of Charts in Odoo 18 Spreadsheet
Celine George
 
How to create Security Group and Manage Access Rights in Odoo 18
How to create Security Group and Manage Access Rights in Odoo 18How to create Security Group and Manage Access Rights in Odoo 18
How to create Security Group and Manage Access Rights in Odoo 18
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
 
Ledger Posting in odoo Continental Accounting
Ledger Posting in odoo Continental AccountingLedger Posting in odoo Continental Accounting
Ledger Posting in odoo Continental Accounting
Celine George
 
How to Create & Manage a New User Menu in Odoo 18
How to Create & Manage a New User Menu in Odoo 18How to Create & Manage a New User Menu in Odoo 18
How to Create & Manage a New User Menu in Odoo 18
Celine George
 
How to Add Customer Rating Mixin in the Odoo 18
How to Add Customer Rating Mixin in the Odoo 18How to Add Customer Rating Mixin in the Odoo 18
How to Add Customer Rating Mixin in the Odoo 18
Celine George
 
How To Open The Form View Of Many2many Clicking Tag In Odoo 18
How To Open The Form View Of Many2many Clicking Tag In Odoo 18How To Open The Form View Of Many2many Clicking Tag In Odoo 18
How To Open The Form View Of Many2many Clicking Tag In Odoo 18
Celine George
 
The Types of Charts in Odoo 18 Spreadsheet
The Types of Charts in Odoo 18 SpreadsheetThe Types of Charts in Odoo 18 Spreadsheet
The Types of Charts in Odoo 18 Spreadsheet
Celine George
 
How to create Security Group and Manage Access Rights in Odoo 18
How to create Security Group and Manage Access Rights in Odoo 18How to create Security Group and Manage Access Rights in Odoo 18
How to create Security Group and Manage Access Rights in Odoo 18
Celine George
 
Ad

Recently uploaded (20)

Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
High Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptxHigh Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptx
Ayush Srivastava
 
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
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Timber Pitch Roof Construction Measurement-2024.pptx
Timber Pitch Roof Construction Measurement-2024.pptxTimber Pitch Roof Construction Measurement-2024.pptx
Timber Pitch Roof Construction Measurement-2024.pptx
Tantish QS, UTM
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
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
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Vitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd year
Vitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd yearVitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd year
Vitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd year
ARUN KUMAR
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
Envenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptxEnvenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptx
rekhapositivity
 
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
 
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
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Fundamentals of PR: Wk 4 - Strategic Communications
Fundamentals of PR: Wk 4 - Strategic CommunicationsFundamentals of PR: Wk 4 - Strategic Communications
Fundamentals of PR: Wk 4 - Strategic Communications
Jordan Williams
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
High Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptxHigh Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptx
Ayush Srivastava
 
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
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Timber Pitch Roof Construction Measurement-2024.pptx
Timber Pitch Roof Construction Measurement-2024.pptxTimber Pitch Roof Construction Measurement-2024.pptx
Timber Pitch Roof Construction Measurement-2024.pptx
Tantish QS, UTM
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
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
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Vitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd year
Vitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd yearVitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd year
Vitamins Chapter-7, Biochemistry and clinical pathology, D.Pharm 2nd year
ARUN KUMAR
 
Envenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptxEnvenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptx
rekhapositivity
 
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
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Fundamentals of PR: Wk 4 - Strategic Communications
Fundamentals of PR: Wk 4 - Strategic CommunicationsFundamentals of PR: Wk 4 - Strategic Communications
Fundamentals of PR: Wk 4 - Strategic Communications
Jordan Williams
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
Ad

Client Actions In Odoo 17 - Odoo 17 Slides

  • 1. Client Actions In Odoo 17 Enterprise
  • 2. Introduction Enterprise In Odoo, a client action refers to a set of actions or operations that are executed on the client side of the application. Odoo is an open-source ERP (Enterprise Resource Planning) and business management software, and it uses a client-server architecture. The client-side actions in Odoo are typically defined using JavaScript and XML. OWL is primarily used for representing and reasoning about knowledge in a machine-readable way. However, the mention of web frameworks, services, core components, and hooks suggests a broader context, possibly related to web development.
  • 3. Enterprise ● Basic XML menu items use matching widget actions to make up for client activities. ● Here, we'll look at how to add a menu to the sales order menu. ● Selecting the sales orders, displaying them, and putting them to use.
  • 4. Enterprise ● Add a menu to the views/views.xml file in the directory of the view to continue. <?xml version="1.0" encoding="utf-8"?> <odoo> <!--Action to show the Dashboard--> <record id="advanced_dashboard_action"model="ir.actions.client"> <field name="name">Advanced Dashboard</field> <field name="tag">advanced_dashboard</field> </record> <!--Menu Item to show the dashboard menu in the module--> <menuitem name="Dashboards" id="advanced_dashboard_menu" sequence="1" action="advanced_dashboard_action"/> </odoo>
  • 5. Enterprise ● when we create a Dashboard action (name to be determined) to the ir.actions.client model. ● When the menu was clicked, the advanced_dashboard tag —which is utilized in the widget to load or call the action stated in the widget—was also added. ● With the aid of this tag, the widget's suggested action (JS file) will be loaded or called.
  • 6. Enterprise /** @odoo-module */ import { registry} from '@web/core/registry'; import { useService } from "@web/core/utils/hooks"; const { Component, mount} = owl export class AdvancedDashboard extends Component { setup(){this.action = useService("action"); this.rpc = this.env.services.rpc} loadData(){ let self = this; rpc.query({model: 'partner.dashboard', method: 'get_values', args:[] }).then(function(data){ console.log(data, 'dataaaa') self.AdvancedDashboard.data = data; }); }} AdvancedDashboard.template = "client_action.advanced_dashboard" registry.category("actions").add("advanced_dashboard", AdvancedDashboard)
  • 7. Enterprise ● We are extending the Component class to create the widget. I have specified a template (Advanced Dashboard) that will be displayed when this activity is carried out. ● The template (advanced_dashboard), which is subsequently added to the main Template's table view class (Advanced Dashboard), receives the data by using the load data method from the start function to retrieve it from the Python code. ● It is now necessary to specify the Python function file and the qweb template that the RPC will use. Thus, we going to begin by generating a models/filename.py Python file.
  • 8. Enterprise from odoo import api, fields, models class EmployeeDashboard(models.Model): _name = 'partner.dashboard' _description = 'Partner Dashboard' user_id = fields.Many2one('res.users', string='Users') name = fields.Char(string='Partner Name') @api.model def get_values(self): data = self.env['partner.dashboard'].search([]) # we can add the values to the dashboard return data.read()
  • 9. Enterprise Some keywords used by the client actions: ● tag: it refers to a unique identifier or key assigned to a specific action or event on the client side of a software application. ● params (optional): In Python, a dictionary is a suitable data structure for representing key-value pairs, making it convenient for sending structured data.
  • 10. Enterprise ● target (optional): 1. Open in the main content area (current): This implies that the client action should be displayed within the main content area of the application. It's the default behavior if the display mode is not explicitly specified. 2. Open in full-screen mode (fullscreen): This suggests that the client action should take up the entire screen when executed. 3. Open in a dialog/popup (new): This indicates that the client action should be displayed in a separate dialog or popup window.
  • 11. Enterprise The template should be defined first (in static/src/xml) <?xml version="1.0" encoding="UTF-8"?> <!-- Template for the Advanced Dashboard --> <templates id="template" xml:space="preserve"> <t t-name="client_action.advanced_dashboard"> <div> <span>Test Case</span> <h1><center><span>Partner Details</span></center></h1> </div> <!-- You can add the templates here→ </t> </templates>
  • 12. Enterprise And the last one, we can add those files in the __manifest__.py like this format 'data': [ 'views/client_action_views.xml' ], 'assets': { 'web.assets_backend': [ 'client_action/static/src/js/client_action.js', 'client_action/static/src/xml/client_action.xml' ], },
  • 13. 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