Skip to Content
मेन्यू
This question has been flagged
1 Reply
4281 Views

Hi,

I started using Docker to create a local instance of Odoo but I can't download the Studio App.. I realised that the Automated Action option create a Server Action to call but I don't understand how it's detect the state of the record to call the action dependending of if it's a new record, an update, a deletion etc..

I don't want to go into the code because with the Dev Mode + Studio + Attachements + Assets I can do all the things without the need of coding (my head is also in 3 differents languages at the same time so it's burning the head to switch everytime, so let's not talk about adding Python) so it's allow me to go fast and work in multple project..

Does someone have an answer to the way it's detect the state ?


Yours faithfully,

RANDRIATAVY Mandresy

Avatar
Discard

Yes, it is possible to call a server action depending on the state of the record. Odoo allows you to use triggers to detect when a record is created, modified, or deleted. You can then use the appropriate server action to respond accordingly.

To set up a trigger for a record, you need to go to the Settings page and select Automated Actions. From there, you can set up a trigger for a particular record. You can choose which action to take when the record is created, modified, or deleted. You can also specify what type of action to take (e.g. create a task, send an email, etc.).

Once you have configured the trigger, you can then create a server action and specify the conditions that must be met for it to be executed. In the Conditions tab, you can select the record state (created, modified, or deleted). When the record meets the conditions, the server action will be triggered and the action will take place.

I hope this has been helpful in understanding how to call a server action depending on the state of the record. you want to call depending of the record state.

Click “Save” and you are done.

Now, whenever the state of the record is changed, the server action will be called automatically.

Author

Thanks you Peter spark, but the thing is without Studio the option Automated Action are unavailable..

Author

Peter Park*

To call a server action in Odoo depending on the state of the record, you can use Automated Actions. Automated Actions are a way to automate certain actions in Odoo based on specific events or conditions.

To set up an Automated Action that calls a server action depending on the state of the record, follow these steps:

Go to the model that you want to create the Automated Action for (e.g. Sales Order, Purchase Order, etc.).
Open the "Automation" tab in the model's configuration.
Click on "Create" to create a new Automated Action.
Give the Automated Action a name and select the event that should trigger the action (e.g. "On Creation", "On Update", etc.).
In the "Conditions" section, define the conditions that must be met in order for the Automated Action to be triggered. For example, you can specify that the server action should only be called if a certain field has a specific value, or if a related record meets certain criteria.
In the "Actions" section, select "Create a Server Action" and choose the server action that you want to execute when the Automated Action is triggered. You can specify additional parameters to pass to the server action, such as the record ID or values of specific fields.
Save the Automated Action.

When the specified event occurs and the conditions are met, the Automated Action will trigger and execute the server action. The server action can then perform various actions based on the state of the record, such as sending an email, updating a record, or creating a new record.

Best Answer

When creating an Automated Action in Odoo, you can configure it to trigger on specific events, such as when a new record is created, an existing record is updated, or a record is deleted.

To do this, you can set the "Trigger Condition" field in the Automated Action configuration to one of the following values:

On Creation
On Update
On Deletion
On Change

When you select one of these options, the Automated Action will be triggered based on the corresponding event. For example, if you select "On Creation", the Automated Action will be triggered whenever a new record is created.

Under the "Action to Do" field, you can then select the "Server Action" option, which allows you to create a new server action that will be executed when the Automated Action is triggered. The server action can perform various actions based on the event that triggered the Automated Action, such as sending an email, updating a record, or creating a new record.

Regarding the Studio App, it is possible that it is not available in your Docker instance of Odoo because it may require additional dependencies or configurations that are not included in the Docker image. If you require the Studio App, you may want to consider setting up a local instance of Odoo outside of Docker, or contacting the Odoo support team for assistance with installing the Studio App in your Docker instance.

Avatar
Discard
Related Posts Replies Views Activity
1
जुल॰ 25
1092
2
मार्च 25
1379
0
फ़र॰ 25
1067
0
फ़र॰ 25
1212
0
फ़र॰ 25
1196