O'Reilly logo

Odoo Development Cookbook by Daniel Reis, Alexandre Fayolle, Holger Brunn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Python code server actions

Server actions have several types available, but executing arbitrary Python code is surely the most flexible one. Used wisely, it can provide power users with the capability to implement advanced business rules from the user interface, without the need to create specific addon modules to install that code.

We will demonstrate using this type of server actions by implementing one that sends reminder notifications to the followers of a Project task.

Getting ready

We will need an Odoo instance with the Project app installed.

How to do it...

To create and try a Python code server action, follow these steps:

  1. Create a new server action: On the Settings top menu, select the Technical | Actions | Server Actions menu item, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required