1 / 5

Creating Server Actions in Odoo 13

Get to learn how you can create several server actions like creating or updating a record, sending SMS, etc. in Odoo 13 theme or app to meet your requirements.<br>

appjetty
Download Presentation

Creating Server Actions in Odoo 13

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Creating Server Actions in Odoo 13 Server actions like creating a record, executing several actions, etc. can enable customers to meet their requirements in Odoo 13. So, let’s understand this functionality in detail and how to use various parameters in server actions accordingly. Before we proceed to discuss all server actions in detail, it is important to understand what server actions actually are. Server Actions: Definitions and Types Server actions are actions that can be executed automatically. As an Odoo admin, under the ‘Technical’ menu comes the Actions -> Server Actions option. However, for the ‘Technical’ menu to be visible, you need to activate the ‘Developer’ mode first. To activate the ‘Developer’ mode, refer to this screenshot. If you use any ​Odoo 13 theme or app, you can define a server action for a complex and long task like “Product Website Published.” There are two ways to create a server action. - Using code - Using user interface (GUI)

  2. Below are some available server actions: - Update the record - Create a new record - Execute Python code - Execute several actions - Send Email - Add Followers - Create the next activity - Send SMS Though all of these server actions are quite important, one of the server actions that you often need to create is ‘Update the Record’. Let’s understand this server action in detail and how to use it. Following that, we will explain the rest of the server actions in brief as well. Update the Record Let’s take a real-life scenario to understand the use of this server action. If you handle a website that has lots of products and wish to publish all the products in one go, you can simply define a server action with “Update the Record”. Now, create a record for ‘Server Actions’.

  3. Add the following details: - Model​ - Model linked to the action - Action to do ​- Select the action ‘Update the Record’ - Feld -​ Specify the field you need to update. - Evaluation Type - ​This is the type to be updated and is of three types - value, reference and python expression - Value -​ It specifies the ‘Value’ field as a literal value. - Reference - ​Allows you to select the existing values in the ‘Record’ field. - Python - ​The ‘Value’ field is interpreted as a ‘Python’ expression. Now add your server action to the related object via the ‘Create Contextual Action’ button. After you add this button, you will see that the menu appears under the ‘Action’ button of the related objects. In this case, the related object will be “Products”.

  4. Below are the several other types of server actions that you can create similarly: Send Email: ​Using this server action, you can send emails to your partners. Add Followers: ​Using this server action, you can add followers and channels. Execute Python: ​Using this server action, you can execute a block of python code. Send SMS/Text Message: ​Using this server action, you can send text messages in bulk to your business partners and customers. Create Next Activity: ​Using this server action, you can create the next activity. For instance, if you have a meeting with a client, you can create an activity ‘Meeting’ and specify its due date. Execute Several Actions: ​Using this server action, you can perform several server actions at a time. Create a New Record: ​Using this server action, you can create a new record. But for that, you need to specify the model you want to create the record in.

  5. In a Nutshell Defining server actions in an Odoo 13 theme or app helps users create or update a record, create an activity, etc. enabling them to meet their requirements. Source Link : ​https://www.appjetty.com/blog/creating-server-actions-in-odoo-13-theme

More Related