How to Integrate a Personalized Button into Odoo18 Chatter

FARHA
November 11, 2024
custom-button-in-odoo18

Tracking important updates and changes in team processes is invaluable for an organization’s long-term success Odoo’s Chatter feature serves as a powerful communication tool is to streamline discussions, ensure traceability, and promote accountability within the team. The Chatter Composer window lets users to easily manage the real-time communication and log important notes and the custom button in odoo18 integration enhances team coordination and keeps everyone aligned on key developments, fostering a more connected and efficient workflow.

Users can write internal notes, communicate with colleagues, and track all changes effectively.. All the communication history, activities, and modifications in the forms will be shown inside chatter.

Odoo’s Chatter is present by default in modules like Sales, Purchase, Inventory, Accounting etc also can added to our custom modules.

Sale Quotation form view in Odoo18

The image shows a default chatter present in the Odoo’s Sale Quotation form view.

sales-quotation-form

As shown in the above image, Send Message Log Note, Activities And attachments are some of the default buttons present in the chatter.

So here lets look into the steps involved in adding a custom button in Odoo18 chatter.

To customize this, we will first create a custom module with all the required folders and files as shown in the image below.

custom-button-in-odoo18

Now add a button in the chatter. In order to do this, we will have to inherit the default mail.chatter template and add our custom button in the custom_button_chatter.xml file as shown in the below image.

custom-chatter-xml

The code above adds a Mark as Important button in the Chatter
The next step is to define the functionality of our custom button in Odoo18 using javascript. The required functionality of the button can defined in the custom_chatter_button.js file as shown in the below image.

custom-chatter-py

Mark as Important Function

The markAsImportant function makes it easy to highlight important updates in Odoo. When you click the Mark as Important button, it identifies the right model and record (like sale.order) and triggers the action_mark_as_important action and this helps your team quickly spot key information in the Chatter feed, ensuring that important details are never missed and everyone stays focused on what matters most.

Next step involves defining the function specified in the js file(i.e., ‘action_mark_as_important’) in the sale_order.py file as shown in the below image.

custom-button-in-odoo18

In the above code, we added a boolean field called ‘Important’ and defined a function, action_mark_as_important, which is triggered when the button is clicked.”

Boolean Field in Odoo18

Now we will add the above defined boolean field in the form view by inheriting the sale.order form view in the sale_order.xml file as shown in the below image.

sale-order-xml

Lastly add the xml and js files under the manifest.py file as shown in the below image.

custom-button-in-odoo18

After executing the above steps, we can see that our custom button in Odoo18 Mark As Important added in the chatter.

mark-as-important

You can update the Important boolean field by clicking Mark as Important button, and a message will posted in the chatter, as shown in the image below.

Thus by following the above steps we can add buttons with functionalities as per the desired requirements, thereby enhancing the user interactions more versatile within the Odoo framework.

custom-button-in-odoo18

With the steps, adding a custom button in Odoo18 Chatter is a direct way to enhance communication, processes, and team collaboration and make a significant difference in how your team interacts with Odoo.

Adding a custom button in Odoo18 Chatter helps to peak your business communication, processed, team collaboration No matter if you’re tracking essential changes or workflows, this feature can essentially change how your team interacts with Odoo.

Seeking Odoo optimization or custom feature implementation? Transines is here with the expertise you need and our expert Odoo consultants will customize your ERP system to your business requirements. We offer Odoo consultation services, including implementation, customization, and support, to ensure your business runs more efficiently.

Lets’s take your Odoo ERP system to thE PEAK? Get in touch with Transines Solutions today and let’s build the perfect Odoo setup for your business. Visit Transines Solutions for more information and fill out this form to get your free consultation.

"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 *