What is the difference between server actions and client actions in Odoo?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
Hi,
1. Server Action(ir.actions.server)
Server Actions work on the base model and provide different types of actions that can be executed automatically.
For example, if you want to add actions to the More context menu and use basic action rules.
Available server actions are:
1. Python code execution: - A block of Python code is executed.
2. Create New Record: - Create a new record with new values.
3. Write to the record: - update the value of the record.
4. Perform some actions: - Define actions that trigger other server actions.
2. Client Action( ir.actions.client)
Client actions are used to trigger actions that are fully implemented on the client.
tag: client-side identifier for the action, an arbitrary string that the client needs to know how to respond.
params: A Python dictionary containing additional data to be sent to the client along with the client action tag
target:
Target options are,
current: Used to open the main content area.
new: it is used to open the window like a popup.
full screen: it is used to open a window in fullscreen mode.
main: It is used to open the main content area without breadcrumbs.
For more information refer the blog:
https://www.cybrosys.com/blog/type-of-actions-in-odoo-16-erp
Hope it helps
Reply : In Odoo, server actions and client actions are two different types of actions that can be defined and triggered within the system. Here's the difference between them
Server Actions:
Server actions are executed on the server-side of Odoo.
They are defined using Python code and can perform complex server-side operations.
Server actions are triggered by events like button clicks, automated actions (cron jobs), or workflow transitions.
They can modify records, execute business logic, send emails, generate reports, update fields, and perform other server-side tasks.
Server actions are typically used for batch operations, data manipulation, or triggering complex workflows.
Client Actions:
Client actions are executed on the client-side of Odoo, which means they are executed within the user's web browser.
They are defined using JavaScript code and are used to enhance the user interface and provide interactive features.
Client actions are triggered by user events like button clicks, menu selections, or other user interactions.
They can manipulate the user interface, show/hide elements, perform validations, make API calls, and provide dynamic behavior.
Client actions are often used for user experience improvements, such as adding dynamic fields, triggering pop-up windows, or updating interface elements without page reloads.
Regards,
Ksolves Team!
HI,
Server Action:
A server action in Odoo is executed on the server-side, typically triggered by an event such as a button click or an automated workflow. It is written in Python code and allows you to define complex business logic and perform operations on the server.
Client Action:
A client action in Odoo refers to an action performed on the client-side, typically within the user interface (UI) of the web browser. It is written in JavaScript and allows you to define interactive behaviors and perform actions without communicating with the server.
Odoo documentation: https://www.odoo.com/documentation/16.0/developer/reference/backend/actions.html
Thanks
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Nov 23
|
1710 | ||
|
0
Mar 15
|
3060 | ||
|
2
Mar 15
|
6195 | ||
|
1
May 25
|
198 | ||
|
0
May 25
|
194 |