際際滷

際際滷Share 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 widgetwas 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

More Related Content

Similar to Client Actions In Odoo 17 - Odoo 17 際際滷s (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
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
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
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
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
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
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
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
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
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 Identify the Margin from the Sales Orders using Odoo 17
How to Identify the Margin from the Sales Orders using Odoo 17How to Identify the Margin from the Sales Orders using Odoo 17
How to Identify the Margin from the Sales Orders using Odoo 17
Celine George
Field Parameters in Odoo 18 - Odoo 18 際際滷s
Field Parameters in Odoo 18 - Odoo 18 際際滷sField Parameters in Odoo 18 - Odoo 18 際際滷s
Field Parameters in Odoo 18 - Odoo 18 際際滷s
Celine George
How to Invoice Shipping Cost to Customer in Odoo 17
How to Invoice Shipping Cost to Customer in Odoo 17How to Invoice Shipping Cost to Customer in Odoo 17
How to Invoice Shipping Cost to Customer in Odoo 17
Celine George
How to configure the retail shop in Odoo 17 Point of Sale
How to configure the retail shop in Odoo 17 Point of SaleHow to configure the retail shop in Odoo 17 Point of Sale
How to configure the retail shop in Odoo 17 Point of Sale
Celine George
How to process Interwarehouse and Intrawarehouse transfers in Odoo
How to process Interwarehouse and Intrawarehouse transfers in OdooHow to process Interwarehouse and Intrawarehouse transfers in Odoo
How to process Interwarehouse and Intrawarehouse transfers in Odoo
Celine George
How to manage Customer Tips with Odoo 17 Point Of Sale
How to manage Customer Tips with Odoo 17 Point Of SaleHow to manage Customer Tips with Odoo 17 Point Of Sale
How to manage Customer Tips with Odoo 17 Point Of Sale
Celine George
Analysis of Conf File Parameters in the Odoo 18
Analysis of Conf File Parameters in the Odoo 18Analysis of Conf File Parameters in the Odoo 18
Analysis of Conf File Parameters in the Odoo 18
Celine George
Purchase Analysis in Odoo 17 - Odoo 際際滷s
Purchase Analysis in Odoo 17 - Odoo 際際滷sPurchase Analysis in Odoo 17 - Odoo 際際滷s
Purchase Analysis in Odoo 17 - Odoo 際際滷s
Celine George
Analysis of Conf File Parameters in Odoo 17
Analysis of Conf File Parameters in Odoo 17Analysis of Conf File Parameters in Odoo 17
Analysis of Conf File Parameters in Odoo 17
Celine George
How to Manage Check Out Process in Odoo 17 Website
How to Manage Check Out Process in Odoo 17 WebsiteHow to Manage Check Out Process in Odoo 17 Website
How to Manage Check Out Process in Odoo 17 Website
Celine George
Managing Online Signature and Payment with Odoo 17
Managing Online Signature and Payment with Odoo 17Managing Online Signature and Payment with Odoo 17
Managing Online Signature and Payment with Odoo 17
Celine George
Recruitment in the Odoo 17 - Odoo 17 際際滷s
Recruitment in the Odoo 17 - Odoo 17 際際滷sRecruitment in the Odoo 17 - Odoo 17 際際滷s
Recruitment in the Odoo 17 - Odoo 17 際際滷s
Celine George
How to Setup Company Data in Odoo 17 Accounting App
How to Setup Company Data in Odoo 17 Accounting AppHow to Setup Company Data in Odoo 17 Accounting App
How to Setup Company Data in Odoo 17 Accounting App
Celine George
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷sHow to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
Celine George
How to Manage Purchase Order Approval in Odoo 18
How to Manage Purchase Order Approval in Odoo 18How to Manage Purchase Order Approval in Odoo 18
How to Manage Purchase Order Approval in Odoo 18
Celine George
How to Configure Outgoing and Incoming mail servers in Odoo 18
How to Configure Outgoing and Incoming mail servers in Odoo 18How to Configure Outgoing and Incoming mail servers in Odoo 18
How to Configure Outgoing and Incoming mail servers in Odoo 18
Celine George
How to Grant Discounts in Sale Order Lines in Odoo 18 Sales
How to Grant Discounts in Sale Order Lines in Odoo 18 SalesHow to Grant Discounts in Sale Order Lines in Odoo 18 Sales
How to Grant Discounts in Sale Order Lines in Odoo 18 Sales
Celine George
URLS and routing in odoo 18 - Odoo 際際滷s
URLS and routing in odoo 18 - Odoo 際際滷sURLS and routing in odoo 18 - Odoo 際際滷s
URLS and routing in odoo 18 - Odoo 際際滷s
Celine George
Comparing RFQ Lines for the best price in Odoo 17
Comparing RFQ Lines for the best price in Odoo 17Comparing RFQ Lines for the best price in Odoo 17
Comparing RFQ Lines for the best price in Odoo 17
Celine George
List View Attributes in Odoo 18 - Odoo 際際滷s
List View Attributes in Odoo 18 - Odoo 際際滷sList View Attributes in Odoo 18 - Odoo 際際滷s
List View Attributes in Odoo 18 - Odoo 際際滷s
Celine George
How to Identify the Margin from the Sales Orders using Odoo 17
How to Identify the Margin from the Sales Orders using Odoo 17How to Identify the Margin from the Sales Orders using Odoo 17
How to Identify the Margin from the Sales Orders using Odoo 17
Celine George
Field Parameters in Odoo 18 - Odoo 18 際際滷s
Field Parameters in Odoo 18 - Odoo 18 際際滷sField Parameters in Odoo 18 - Odoo 18 際際滷s
Field Parameters in Odoo 18 - Odoo 18 際際滷s
Celine George
How to Invoice Shipping Cost to Customer in Odoo 17
How to Invoice Shipping Cost to Customer in Odoo 17How to Invoice Shipping Cost to Customer in Odoo 17
How to Invoice Shipping Cost to Customer in Odoo 17
Celine George
How to configure the retail shop in Odoo 17 Point of Sale
How to configure the retail shop in Odoo 17 Point of SaleHow to configure the retail shop in Odoo 17 Point of Sale
How to configure the retail shop in Odoo 17 Point of Sale
Celine George
How to process Interwarehouse and Intrawarehouse transfers in Odoo
How to process Interwarehouse and Intrawarehouse transfers in OdooHow to process Interwarehouse and Intrawarehouse transfers in Odoo
How to process Interwarehouse and Intrawarehouse transfers in Odoo
Celine George
How to manage Customer Tips with Odoo 17 Point Of Sale
How to manage Customer Tips with Odoo 17 Point Of SaleHow to manage Customer Tips with Odoo 17 Point Of Sale
How to manage Customer Tips with Odoo 17 Point Of Sale
Celine George
Analysis of Conf File Parameters in the Odoo 18
Analysis of Conf File Parameters in the Odoo 18Analysis of Conf File Parameters in the Odoo 18
Analysis of Conf File Parameters in the Odoo 18
Celine George
Purchase Analysis in Odoo 17 - Odoo 際際滷s
Purchase Analysis in Odoo 17 - Odoo 際際滷sPurchase Analysis in Odoo 17 - Odoo 際際滷s
Purchase Analysis in Odoo 17 - Odoo 際際滷s
Celine George
Analysis of Conf File Parameters in Odoo 17
Analysis of Conf File Parameters in Odoo 17Analysis of Conf File Parameters in Odoo 17
Analysis of Conf File Parameters in Odoo 17
Celine George
How to Manage Check Out Process in Odoo 17 Website
How to Manage Check Out Process in Odoo 17 WebsiteHow to Manage Check Out Process in Odoo 17 Website
How to Manage Check Out Process in Odoo 17 Website
Celine George
Managing Online Signature and Payment with Odoo 17
Managing Online Signature and Payment with Odoo 17Managing Online Signature and Payment with Odoo 17
Managing Online Signature and Payment with Odoo 17
Celine George
Recruitment in the Odoo 17 - Odoo 17 際際滷s
Recruitment in the Odoo 17 - Odoo 17 際際滷sRecruitment in the Odoo 17 - Odoo 17 際際滷s
Recruitment in the Odoo 17 - Odoo 17 際際滷s
Celine George
How to Setup Company Data in Odoo 17 Accounting App
How to Setup Company Data in Odoo 17 Accounting AppHow to Setup Company Data in Odoo 17 Accounting App
How to Setup Company Data in Odoo 17 Accounting App
Celine George
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷sHow to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
How to Install Odoo 18 with Pycharm - Odoo 18 際際滷s
Celine George
How to Manage Purchase Order Approval in Odoo 18
How to Manage Purchase Order Approval in Odoo 18How to Manage Purchase Order Approval in Odoo 18
How to Manage Purchase Order Approval in Odoo 18
Celine George
How to Configure Outgoing and Incoming mail servers in Odoo 18
How to Configure Outgoing and Incoming mail servers in Odoo 18How to Configure Outgoing and Incoming mail servers in Odoo 18
How to Configure Outgoing and Incoming mail servers in Odoo 18
Celine George
How to Grant Discounts in Sale Order Lines in Odoo 18 Sales
How to Grant Discounts in Sale Order Lines in Odoo 18 SalesHow to Grant Discounts in Sale Order Lines in Odoo 18 Sales
How to Grant Discounts in Sale Order Lines in Odoo 18 Sales
Celine George
URLS and routing in odoo 18 - Odoo 際際滷s
URLS and routing in odoo 18 - Odoo 際際滷sURLS and routing in odoo 18 - Odoo 際際滷s
URLS and routing in odoo 18 - Odoo 際際滷s
Celine George
Comparing RFQ Lines for the best price in Odoo 17
Comparing RFQ Lines for the best price in Odoo 17Comparing RFQ Lines for the best price in Odoo 17
Comparing RFQ Lines for the best price in Odoo 17
Celine George
List View Attributes in Odoo 18 - Odoo 際際滷s
List View Attributes in Odoo 18 - Odoo 際際滷sList View Attributes in Odoo 18 - Odoo 際際滷s
List View Attributes in Odoo 18 - Odoo 際際滷s
Celine George

Recently uploaded (20)

Different perspectives on dugout canoe heritage of Soomaa.pdf
Different perspectives on dugout canoe heritage of Soomaa.pdfDifferent perspectives on dugout canoe heritage of Soomaa.pdf
Different perspectives on dugout canoe heritage of Soomaa.pdf
Aivar Ruukel
UNIT 1 Introduction to communication.pptx
UNIT 1 Introduction to communication.pptxUNIT 1 Introduction to communication.pptx
UNIT 1 Introduction to communication.pptx
HARIHARAN A
3. AI Trust Layer, Governance Explainability, Security & Compliance.pdf
3. AI Trust Layer, Governance  Explainability, Security & Compliance.pdf3. AI Trust Layer, Governance  Explainability, Security & Compliance.pdf
3. AI Trust Layer, Governance Explainability, Security & Compliance.pdf
Mukesh Kala
10.socialorganisationandsocialsystem .pptx
10.socialorganisationandsocialsystem .pptx10.socialorganisationandsocialsystem .pptx
10.socialorganisationandsocialsystem .pptx
Vivek Bhattji
technology in banking ppt FOR E-CONTENT -2.ppt
technology in banking ppt  FOR E-CONTENT -2.ppttechnology in banking ppt  FOR E-CONTENT -2.ppt
technology in banking ppt FOR E-CONTENT -2.ppt
HARIHARAN A
Different Facets of Knowledge on different View.pptx
Different Facets of Knowledge on different View.pptxDifferent Facets of Knowledge on different View.pptx
Different Facets of Knowledge on different View.pptx
NrapendraVirSingh
MIPLM subject matter expert Dr Alihan Kaya
MIPLM subject matter expert Dr Alihan KayaMIPLM subject matter expert Dr Alihan Kaya
MIPLM subject matter expert Dr Alihan Kaya
MIPLM
Knownsense 2025 Finals-U-25 General Quiz.pdf
Knownsense 2025 Finals-U-25 General Quiz.pdfKnownsense 2025 Finals-U-25 General Quiz.pdf
Knownsense 2025 Finals-U-25 General Quiz.pdf
Pragya - UEM Kolkata Quiz Club
MIPLM subject matter expert Sascha Kamhuber
MIPLM subject matter expert Sascha KamhuberMIPLM subject matter expert Sascha Kamhuber
MIPLM subject matter expert Sascha Kamhuber
MIPLM
MIPLM subject matter expert Dr Robert Klinski
MIPLM subject matter expert Dr Robert KlinskiMIPLM subject matter expert Dr Robert Klinski
MIPLM subject matter expert Dr Robert Klinski
MIPLM
NURSING PROCESS AND ITS STEPS .pptx
NURSING PROCESS AND ITS STEPS                 .pptxNURSING PROCESS AND ITS STEPS                 .pptx
NURSING PROCESS AND ITS STEPS .pptx
PoojaSen20
Conrad "Accessibility Essentials: Introductory Seminar"
Conrad "Accessibility Essentials: Introductory Seminar"Conrad "Accessibility Essentials: Introductory Seminar"
Conrad "Accessibility Essentials: Introductory Seminar"
National Information Standards Organization (NISO)
General Quiz at Maharaja Agrasen College | Amlan Sarkar | Prelims with Answer...
General Quiz at Maharaja Agrasen College | Amlan Sarkar | Prelims with Answer...General Quiz at Maharaja Agrasen College | Amlan Sarkar | Prelims with Answer...
General Quiz at Maharaja Agrasen College | Amlan Sarkar | Prelims with Answer...
Amlan Sarkar
A-Z GENERAL QUIZ | THE QUIZ CLUB OF PSGCAS | 14TH MARCH 2025.pptx
A-Z GENERAL QUIZ | THE QUIZ CLUB OF PSGCAS | 14TH MARCH 2025.pptxA-Z GENERAL QUIZ | THE QUIZ CLUB OF PSGCAS | 14TH MARCH 2025.pptx
A-Z GENERAL QUIZ | THE QUIZ CLUB OF PSGCAS | 14TH MARCH 2025.pptx
Quiz Club of PSG College of Arts & Science
URINE SPECIMEN COLLECTION AND HANDLING CLASS 1 FOR ALL PARAMEDICAL OR CLINICA...
URINE SPECIMEN COLLECTION AND HANDLING CLASS 1 FOR ALL PARAMEDICAL OR CLINICA...URINE SPECIMEN COLLECTION AND HANDLING CLASS 1 FOR ALL PARAMEDICAL OR CLINICA...
URINE SPECIMEN COLLECTION AND HANDLING CLASS 1 FOR ALL PARAMEDICAL OR CLINICA...
Prabhakar Singh Patel
Quizzitch Cup_Sports Quiz 2025_Finals.pptx
Quizzitch Cup_Sports Quiz 2025_Finals.pptxQuizzitch Cup_Sports Quiz 2025_Finals.pptx
Quizzitch Cup_Sports Quiz 2025_Finals.pptx
Anand Kumar
Pass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study Material
Pass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study MaterialPass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study Material
Pass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study Material
Jenny408767
BIOPHARMACEUTICS AND PHARMACOKINETICS(BP604T) - Copy (3).pptx
BIOPHARMACEUTICS AND PHARMACOKINETICS(BP604T) - Copy (3).pptxBIOPHARMACEUTICS AND PHARMACOKINETICS(BP604T) - Copy (3).pptx
BIOPHARMACEUTICS AND PHARMACOKINETICS(BP604T) - Copy (3).pptx
maniramkumar
Enhancing SoTL through Generative AI -- Opportunities and Ethical Considerati...
Enhancing SoTL through Generative AI -- Opportunities and Ethical Considerati...Enhancing SoTL through Generative AI -- Opportunities and Ethical Considerati...
Enhancing SoTL through Generative AI -- Opportunities and Ethical Considerati...
Sue Beckingham
Unit1 Inroduction to Internal Combustion Engines
Unit1  Inroduction to Internal Combustion EnginesUnit1  Inroduction to Internal Combustion Engines
Unit1 Inroduction to Internal Combustion Engines
NileshKumbhar21
Different perspectives on dugout canoe heritage of Soomaa.pdf
Different perspectives on dugout canoe heritage of Soomaa.pdfDifferent perspectives on dugout canoe heritage of Soomaa.pdf
Different perspectives on dugout canoe heritage of Soomaa.pdf
Aivar Ruukel
UNIT 1 Introduction to communication.pptx
UNIT 1 Introduction to communication.pptxUNIT 1 Introduction to communication.pptx
UNIT 1 Introduction to communication.pptx
HARIHARAN A
3. AI Trust Layer, Governance Explainability, Security & Compliance.pdf
3. AI Trust Layer, Governance  Explainability, Security & Compliance.pdf3. AI Trust Layer, Governance  Explainability, Security & Compliance.pdf
3. AI Trust Layer, Governance Explainability, Security & Compliance.pdf
Mukesh Kala
10.socialorganisationandsocialsystem .pptx
10.socialorganisationandsocialsystem .pptx10.socialorganisationandsocialsystem .pptx
10.socialorganisationandsocialsystem .pptx
Vivek Bhattji
technology in banking ppt FOR E-CONTENT -2.ppt
technology in banking ppt  FOR E-CONTENT -2.ppttechnology in banking ppt  FOR E-CONTENT -2.ppt
technology in banking ppt FOR E-CONTENT -2.ppt
HARIHARAN A
Different Facets of Knowledge on different View.pptx
Different Facets of Knowledge on different View.pptxDifferent Facets of Knowledge on different View.pptx
Different Facets of Knowledge on different View.pptx
NrapendraVirSingh
MIPLM subject matter expert Dr Alihan Kaya
MIPLM subject matter expert Dr Alihan KayaMIPLM subject matter expert Dr Alihan Kaya
MIPLM subject matter expert Dr Alihan Kaya
MIPLM
MIPLM subject matter expert Sascha Kamhuber
MIPLM subject matter expert Sascha KamhuberMIPLM subject matter expert Sascha Kamhuber
MIPLM subject matter expert Sascha Kamhuber
MIPLM
MIPLM subject matter expert Dr Robert Klinski
MIPLM subject matter expert Dr Robert KlinskiMIPLM subject matter expert Dr Robert Klinski
MIPLM subject matter expert Dr Robert Klinski
MIPLM
NURSING PROCESS AND ITS STEPS .pptx
NURSING PROCESS AND ITS STEPS                 .pptxNURSING PROCESS AND ITS STEPS                 .pptx
NURSING PROCESS AND ITS STEPS .pptx
PoojaSen20
General Quiz at Maharaja Agrasen College | Amlan Sarkar | Prelims with Answer...
General Quiz at Maharaja Agrasen College | Amlan Sarkar | Prelims with Answer...General Quiz at Maharaja Agrasen College | Amlan Sarkar | Prelims with Answer...
General Quiz at Maharaja Agrasen College | Amlan Sarkar | Prelims with Answer...
Amlan Sarkar
URINE SPECIMEN COLLECTION AND HANDLING CLASS 1 FOR ALL PARAMEDICAL OR CLINICA...
URINE SPECIMEN COLLECTION AND HANDLING CLASS 1 FOR ALL PARAMEDICAL OR CLINICA...URINE SPECIMEN COLLECTION AND HANDLING CLASS 1 FOR ALL PARAMEDICAL OR CLINICA...
URINE SPECIMEN COLLECTION AND HANDLING CLASS 1 FOR ALL PARAMEDICAL OR CLINICA...
Prabhakar Singh Patel
Quizzitch Cup_Sports Quiz 2025_Finals.pptx
Quizzitch Cup_Sports Quiz 2025_Finals.pptxQuizzitch Cup_Sports Quiz 2025_Finals.pptx
Quizzitch Cup_Sports Quiz 2025_Finals.pptx
Anand Kumar
Pass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study Material
Pass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study MaterialPass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study Material
Pass SAP C_C4H47_2503 in 2025 | Latest Exam Questions & Study Material
Jenny408767
BIOPHARMACEUTICS AND PHARMACOKINETICS(BP604T) - Copy (3).pptx
BIOPHARMACEUTICS AND PHARMACOKINETICS(BP604T) - Copy (3).pptxBIOPHARMACEUTICS AND PHARMACOKINETICS(BP604T) - Copy (3).pptx
BIOPHARMACEUTICS AND PHARMACOKINETICS(BP604T) - Copy (3).pptx
maniramkumar
Enhancing SoTL through Generative AI -- Opportunities and Ethical Considerati...
Enhancing SoTL through Generative AI -- Opportunities and Ethical Considerati...Enhancing SoTL through Generative AI -- Opportunities and Ethical Considerati...
Enhancing SoTL through Generative AI -- Opportunities and Ethical Considerati...
Sue Beckingham
Unit1 Inroduction to Internal Combustion Engines
Unit1  Inroduction to Internal Combustion EnginesUnit1  Inroduction to Internal Combustion Engines
Unit1 Inroduction to Internal Combustion Engines
NileshKumbhar21

Client Actions In Odoo 17 - Odoo 17 際際滷s

  • 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 widgetwas 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