Odoo Development - Server Actions in Odoo 13
Odoo developement tutorials - Types of Actions in Odoo
Server Actions (ir.actions.server)
class odoo.addons.base.models.ir_actions.IrActionsServer(pool, cr)
Server actions model. Server action work on a base model and offer various type of actions that can be executed automatically, for example using base action rules, of manually, by adding the action in the ‘More’ contextual menu.
Since Odoo 8.0 a button ‘Create Menu Action’ button is available on the action form view. It creates an entry in the More menu of the base model. This allows to create server actions and run them in mass mode easily through the interface.
The available actions are :
‘Execute Python Code’: a block of python code that will be executed
‘Create a new Record’: create a new record with new values
‘Write on a Record’: update the values of a record
‘Execute several actions’: define an action that triggers several other server actions
Allow triggering complex server code from any valid action location. Only two fields are relevant to clients:
id
the in-database identifier of the server action to run
context (optional)
context data to use when running the server action
In-database records are significantly richer and can perform a number of specific or generic actions based on their state. Some fields (and corresponding behaviors) are shared between states:
model_id
Odoo model linked to the action.
state
code: Executes python code given through the code argument.
object_create: Creates a new record of model crud_model_id following fields_lines specifications.
object_write: Updates the current record(s) following fields_lines specifications
multi: Executes serveral actions given through the child_ids argument.
#odoodevelopment #odootutorials #odoo13
For More Videos Subscribe to our YouTube channel.
Visit our company website: https://www.cybrosys.com/
Connect with us:
Facebook: http://ow.ly/Ty0Q30lc5TU
twitter: http://ow.ly/s5cV30lc5Vc
LinkedIn: http://ow.ly/GJfg30lc5WT
Pinterest: http://bit.ly/2I2b5N0
Other Videos By Cybrosys Technologies
Other Statistics
The Elder Scrolls Online Statistics For Cybrosys Technologies
Cybrosys Technologies currently has 8,696 views spread across 2 videos for The Elder Scrolls Online. Less than an hour worth of The Elder Scrolls Online videos were uploaded to his channel, making up less than 0.09% of the total overall content on Cybrosys Technologies's YouTube channel.