Creating server actions
Server actions underpin Odoo’s 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 an action on a document by selecting it from the More button. We will create this kind of action for project tasks so that we can Set Priority by starring the currently selected task and setting a deadline on it for 3 days from now.
Getting ready
We will need an Odoo instance with the Project app installed. We will also need Developer Mode activated. If it’s not already activated, activate it in the Odoo Settings dashboard.
How to do it...
To create a server action and use it from the More menu, follow these steps:
- From the Settings top menu, select the Technical | Actions | Server Actions menu item and click on the Create Contextual Action button...