5.35

v 16.0 Third Party 11
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Project (project)
Discuss (mail)
Lines of code 78
Technical Name state_selection_colors
LicenseLGPL-3
Websitehttps://www.rising-systems.de/
Versions 16.0 15.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Project (project)
Discuss (mail)
Lines of code 78
Technical Name state_selection_colors
LicenseLGPL-3
Websitehttps://www.rising-systems.de/
Versions 16.0 15.0

Odoo default state_selection gives 3 colors:

                - Gray: when state value is 'normal'
                - Green: when state value is 'done'
                - Red: when state value is 'blocked'
              


With this module we can add more colors:

                - Just add the color code after _
                - If you need to add Cyan color add the color code of the Cyan
                - If you need to add any other color just add the color code after _
              


            
Just add the desired color to your state field like:
              state = fields.Selection([('blocked', 'Blocked'),('color_00FFFF', 'Cyan'),('color_800080', 'Purple'),('color_FF00FF', 'Magenta'),('color_FFC0CB', 'Pink'),('normal', 'Gray')],default='normal',tracking=True)
            
            
              And in the xml use the widget = 'state_selection' on the state field
            


Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.