Log: log(message, level='info'): logging function to record debug information in ir.logging table Records: recordset of all records on which the action is triggered in multi-mode may be void time, datetime, dateutil, timezone: useful Python librariesįloat_compare: Odoo function to compare floats based on specific precisions Record: record on which the action is triggered may be void Model: Odoo Model of the record on which the action is triggered is a void recordset The available variables that we can use in this code are the following,Įnv: Odoo Environment on which the action is triggered Using this type of server action, we can execute a python code. Now let’s look at the various types of server actions and their working. Model_id - is the model linked to the action This server action sets a specific user as a salesperson for a contact. Let’s create data.xml inside or data directory. The server actions come in handy when we have to execute some small tweaks directly to the Odoo system.įor creating a server action inside our custom module, we have to make a data record in the “ir.rver” model. The following are the available actions to do while creating a server action. Ensure the developer mode is enabled for accessing the “Technical” menu. It can be configured from Settings > Technical > Server Actions. When a server action is created, it will be added to the “Action” contextual menu. This blog discusses how we can use the Server actions and their various parameters. We can meet specific requirements in Odoo using the “Server Actions “ feature.
0 Comments
Leave a Reply. |