Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
2549 Prikazi

Hi,

I created a server action for the contact (res.partner) model, called "Statistics".

In this server action, when I click on "Create Contextual Action", this server action appears at the bottom of the list of actions of the contact model. This is OK.

I would like to change the position of this "Statistics" action, and put it after the "Export" action. I don't know how to do it.

I'm using Odoo 11.

Thanks,

Boris

Avatar
Opusti
Avtor

Cybrosys Techno Solutions thank you for your reply.

However it's not working. In debug mode, I don't see the sequence attribute. I upload my statistics server action as a record (Statistics...my_code). Now, in Settings -> Actions -> Server Actions My Statistics server action appears in the top, but in Contacts -> Actions it still appears in the bottom position.

Regards,

Boris

Best Answer

In Odoo 11, the order of actions in the list is determined by the sequence number assigned to each action. To change the position of the "Statistics" action and place it after the "Export" action, you can follow these steps:

Go to the developer mode in Odoo by enabling the debug mode in the user settings.

Navigate to the "Settings" menu and select "Technical" -> "Actions" -> "Server Actions".

Search for your "Statistics" action in the list and open it for editing.

In the form view of the server action, you should see a field called "Sequence". Enter a higher number for the "Statistics" action than the "Export" action to move it down the list. For example, if the "Export" action has a sequence number of 10, you can set the "Statistics" action to 20.

Save the changes to the server action.

Refresh your Odoo page and go to the contact model. The "Statistics" action should now appear after the "Export" action.

By adjusting the sequence number, you can control the order of the actions in the list. Remember that lower sequence numbers appear before higher ones.

Avatar
Opusti