Add an Icon in Systray in Odoo 17 

May 2, 2024

In Odoo, the top right-hand side corner of the menu bar in the user interface is known as the systray. It is in this part where the web client displays a few widgets such as a messaging menu, notifications/reminders, etc. The default options in the system include a username and a drop-down list. The options in the system depend on the specific module or application being used.

The highlighted section in the image below indicates the systray icons.

In this blog, let us look into the steps involved to add an icon in the systray in Odoo17.

Firstly, create a directory and within it create a ‘static’ folder. Then add ‘js’ and ‘xml’ folders to the static folder.

In the above image, the name of the directory is ‘systray_icon’.

Next step would be to create the view for the new systray icon. The image below shows the ‘xml’ code for this.

The above code will add a ‘shopping cart’ icon in the notification bar. Different style attributes such as padding, margin, color etc. can be added according to the requirement.

The next step will involve creating an action for the icon using JavaScript. The image below shows the contents to be included in Js file to create an action for the icon.

The image below shows the contents to be included in the Js file to create an action for the icon. 

The above code will trigger a drop-down menu upon clicking the systray icon. Upon clicking an 

option from the drop-down, a pop-up wizard will be triggered, and a new form for creating a sale 

or purchase order will be opened depending upon the selection. 

Next step will be declaring the above files in the file of the module as shown in the image below.

After completing all these steps, install the module. The ‘shopping cart’ image will be displayed in the systray as shown in the image below.

Upon clicking the icon, a drop-down list will appear. Selecting the desired option will trigger a new pop-up wizard for creating a new Sale Order / Purchase Order.

Similarly, a purchase order can be created by clicking on the Purchase Order option from the drop-down.

After entering the required details we can save this record by clicking on the ‘Save’ button. The created record can then be accessed from the Purchase Module as well.

By following the above steps, we can easily create an icon in Systray along with the dropdown options in Odoo 17. javascript:”javascript:”javascript

"Unlock the Full Potential of Your Business with Odoo ERP!"

"Get a Cost Estimate for Your ERP Project, Absolutely FREE!"

Get a Free Quote

Leave a Reply

Your email address will not be published. Required fields are marked *