Enable Dark Mode!
how-to-create-a-rainbow-man-effect-in-odoo-17.jpg
By: Jumana Jabin MP

How to Create a Rainbow Man Effect in Odoo 17

Technical Odoo 17

The Rainbow Man in Odoo is a delightful animation that pops up when users complete a task and click a button. Designed to infuse a sense of fun and reward into the software experience, this feature is currently operational in certain functions within Odoo. For instance, in the CRM module, the Rainbow Man makes an appearance when an opportunity is marked as won. Moreover, users have the flexibility to incorporate the Rainbow Man in other modules such as Sales, Purchase, etc., enhancing the user experience by adding a touch of animation to signify task completion in various events.

This article provides insights into exploring and implementing the Rainbow Man effect in Odoo 17. Additionally, it guides users on customizing Rainbow Men to align with their specific preferences and requirements.

Upon choosing Studio from a range of buttons in Odoo, including options like Email, Confirm, or Cancel, users can leverage the rainbow man effect within its properties.

This functionality comes pre-enabled for the following scenarios:

* When opportunities are successfully marked as won

* Upon emptying user inboxes

* After completing a guided tour

* When finishing reconciliations

The inclusion of the rainbow_man effect serves two main purposes:

* To provide a rewarding experience upon completing specific activities.

* To inject an element of enjoyment into the software interface, making the overall user experience more engaging and entertaining

Here, we add the rainbow man effect to the purchase order confirm button.

class PurchaseOrder(models.Model):
   _inherit = 'purchase.order'
   def button_confirm(self):
       super(PurchaseOrder, self).button_confirm()
       return {
           'effect': {
               'fadeout': 'slow',
               'message': 'Purchase order is confirmed',
                          'type': 'rainbow_man',
       }
       }

fadeout: it can be fast and slow

Message: which shows the displaying message with rainbow man.

After confirming the purchase order, we can see there is an effect on the message.

how-to-create-a-rainbow-man-effect-in-odoo-17-1-cybrosys

The rainbow man effect doubles as a notification type, offering users the flexibility to utilize it in this manner. By incorporating the desired notification message into the 'message' section of the return statement, users can define the content displayed during the rainbow man effect presentation.

We can apply this effect to any of the actions, and we can go through another example:

A simple button click activates the rainbow man effect.

XML:

<button name="authenticate_button" string="AUTHENTICATE"
       type="object" class="oe_highlight"
       groups="base.group_system"/>

In the corresponding function within the .py file, a straightforward implementation involves returning both the rainbow man effect and the accompanying message to be displayed.

def authenticate_button(self):
   return {
       'effect': {
           'fadeout': 'slow',
           'message': 'Authentication Success',
           'type': 'rainbow_man',
       }
   }

We can see this,

how-to-create-a-rainbow-man-effect-in-odoo-17-2-cybrosys

This is how you can include the rainbow man effect in Odoo: use it for notifications, communicate messages to users, and bring in a fun element with the customizable rainbow effect.

To read more about creating a rainbow man effect in Odoo 16, refer to our blog How to Create a Rainbow Man Effect in Odoo 16


If you need any assistance in odoo, we are online, please chat with us.



0
Comments



Leave a comment



whatsapp_icon
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message