Creating server actions
Server actions underpin the Odoo automation tools. They allow us to describe the actions to perform. These actions are then available to be called by event triggers, or to be triggered automatically when certain time conditions are met.
The simplest case is to let the end user perform some action on a document by selecting it from the More button menu. We will create such an action for project tasks, to Set as Priority by starring the currently selected task and setting a deadline on it to three days from now.
Getting ready
We will need an Odoo instance with the Project app installed. We will also need the Developer Mode activated. If it's not, activate it in the Odoo About dialog.
How to do it...
To create a server action and use it from the More menu, follow these steps:
- On the Settings top menu, select the Technical | Actions | Server Actions menu item, and click on the Create button at the top of the record list.
- Fill out the server action form with these values...