53.Odoo Server Action || Add New Action To Action Button In Odoo || Odoo 14 Development

Описание к видео 53.Odoo Server Action || Add New Action To Action Button In Odoo || Odoo 14 Development

How to add new action to action button in Odoo 14. How to create a server action in Odoo. Different type of actions in Odoo. Steps to create server action in Odoo. Steps to add new action to odoo action button. Odoo 14 development tutorials, how to add new server action in Odoo 14.

Server Action:

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


llow 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 several actions given through the child_ids argument.

State fields
Depending on its state, the behavior is defined through different fields. The concerned state is given after each field.

code (code)
Specify a piece of Python code to execute when the action is called

Odoo 14 Playlist:    • 2. How To Create Module In Odoo 14 ||...  
Module: https://apps.odoo.com/apps/modules/14...


Website: https://www.odoomates.tech/
Github: https://github.com/odoomates
Email : [email protected]
Facebook:   / odoomate  
Twitter:   / odoomates  
Support Us in Ko Fi : https://ko-fi.com/odoomates

Комментарии

Информация по комментариям в разработке