Enable Dark Mode!
how-to-create-a-rainbow-man-effect-in-odoo-18.jpg
By: Aftab K

How to Create a Rainbow Man Effect in Odoo 18

Odoo 18

In Odoo 18, the Rainbow Man is an engaging animation that appears when users complete a task and click a button. This feature is designed to enhance the software experience by adding an element of fun and motivation. It is available in specific areas of Odoo, such as the CRM module, where it appears when an opportunity is marked as won. Additionally, users can incorporate the Rainbow Man into other modules like Sales and Purchase, making task completion more interactive and visually rewarding.

This article explores the implementation of the Rainbow Man effect in Odoo 18 and provides a guide on customizing it to match individual preferences and needs.

When selecting Studio from various button options in Odoo, such as Email, Confirm, or Cancel, users can enable the Rainbow Man effect through its properties.

This feature is automatically activated in the following cases:

* When an opportunity is marked as won

* After clearing a user's inbox

* Upon completing a guided tour

* When reconciliation is finalized

The rainbow_man effect is included for two key reasons:

* To create a sense of achievement when users complete certain tasks.

* To add a fun and interactive touch to the interface, enhancing user engagement.

In this case, the rainbow_man effect is applied to the Confirm button in the Purchase Order.

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',
           }
       }

The fadeout effect can be adjusted to either a fast or slow transition.

The Message refers to the text displayed alongside the rainbow_man effect.

After confirming the purchase order, an effect appears on the displayed message.

How to Create a Rainbow Man Effect in Odoo 18-cybrosys

The rainbow_man effect can also function as a notification, giving users the flexibility to use it this way. By specifying the desired message in the 'message' section of the return statement, users can control the content displayed during the effect.

This effect can be applied to various actions. Let's explore another example:

Clicking a button can trigger the rainbow_man effect.

XML

<button name="activate_rainbow"
       type="object"
       string="Activate"
       class="btn-primary"/>

In the relevant function within the .py file, the rainbow_man effect can be implemented by returning it along with the message to be displayed.

def activate_rainbow(self):
   return {
       'effect': {
           'fadeout': 'slow',
           'message': 'Button is Activated',
           'type': 'rainbow_man',
       }
   }

This can be observed in action.

How to Create a Rainbow Man Effect in Odoo 18-cybrosys

This is how you can integrate the rainbow_man effect in Odoo—to use it for notifications, convey messages to users, and add a touch of fun with its customizable display.

To read more about how to create a Rainbow Man Effect in Odoo 17, refer to our blog How to Create a Rainbow Man Effect in Odoo 17.


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