Community mailing list archives

community@mail.odoo.com

Re: change Kanban background color base don state

by
Solanki Shamji
- 05/24/2016 07:53:47
I think You can change color with following changes 

1. Define one field say color

color = fields.Integer('Color Index')

2. Change color value as per state change 

for example for stage one color = 1, stage 2 color = 2

3. Changes in  kanban div add color.row_value

<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">

Thanks.

On Tue, May 24, 2016 at 5:12 PM, Stefan Becker <ich@funbaker.de> wrote:
Hello,

the kanban background color should be defined by the field color (at least in the project module).

The behaviour of kanban and color doesnt seems to be well documentated [1], so you probably need to do some reverse
engineering.

Maybe someone with more knowledge could post a link or something.

[1] https://www.odoo.com/documentation/9.0/reference/views.html#kanban

------
Stefan

On Di, 2016-05-24 at 10:08 +0000, info@ygol.com wrote:
> Hi community,
>  
> How may I automatically change the kanban background color based on the "state" (status_id) field?
>  
> do you know if there is already a module.
>  
> TIA
>  
> --
> Yves Goldberg - איב גולדברג
> odoo| Official Partner - OCA member
> Open Source ERP, CRM & CMS
>  
> T +972 (3) 720 8818
> M +972 (55) 966 1405
> T +32 (2) 588 2500
>  
> www.ygol.com
> Raanana [ISRAEL]
>  
>        
> --
>  
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59
> Post to: mailto:community@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe