İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
6658 Görünümler

Hi, i would like to have the way to change the color of the kanban items in the equipment maintenance module. there is a way that those items can change the color based on the time of creation?  like:


if is in a specific stage from 0-24 hrs, the item changes the color

when is in a speficic stage from 24-48 hrs, the items changes to another color, and so on...


thanks.

Avatar
Vazgeç

you have to create one compute fields like color = fields.Char(compute="function")

OR,

Cron job to call every day check creation date and set color

and then after,

you can use in XML side

<div t-attf-class="#{kanban_color(record.color.raw_value)}">

En İyi Yanıt

you have to create one compute fields like color = fields.Char(compute="function")

OR,

Create a Cron job to call every day check creation date and set color on those records are done 24hrs or whatever you want from created Date

and then after,

you can use in XML side

<div t-attf-class="#{kanban_color(record.color.raw_value)}">

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Şub 25
1556
1
Oca 25
1851
2
Oca 24
1789
2
Ara 23
1742
1
Ara 23
1610