Chapter 19 - Odoo 15 Development Book

Create Server Actions

Server Actions are actions that can be executed automatically.

Let's see how we can do this.

Enable the developer mode

Go to Settings->Developer Tools and click on the link ‘Activate the developer mode’ to enable the developer mode.

odoo-development-book

Then, Go to menu Settings -> Technical -> Actions -> Server Actions. Click the ‘Create’ button.

Available Server Actions:

  • Execute Python Code: Python code that will be executed
  • Create a new Record: Creates a new record with values
  • Update the Record: Update record values
  • Execute several actions: Trigger several server actions at a time
  • Send Email: Send Emails to partners
  • Add Followers: Add Channels and Followers.
  • Create Next Activity: Schedule the next activity, such as meeting, emails
  • Send SMS Text Message: Send bulk text messages to the partners

Update the Record

If you want to set up the salesperson for some of my partners. You can easily update this using the 'Update Record' server function.

odoo-development-book
  • Model: Model linked to the action
  • Action To Do: Select the Server action
  • Field: Specify the Field that you need to update
  • Evaluation Type: Type of the value to be updated (Value, Reference, Python Expression)
  • Reference: Select the existing values in the ‘Record’ field
  • Value: ‘Value’ field specifies the literal value
  • Python Expression: Value field is interpreted as python expression
odoo-development-book
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message