تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1128 أدوات العرض

     # Field for color in calendar    

color_avatar = fields.Char(compute='_compute_color_avatar')

    # Method to compute color_avatar field    

@api.depends('status','color_avatar')    

def _compute_color_avatar(self):        

​for record in self:            

​if record.status == "done":                

​    record.color_avatar = "#358BD2"  # Green color

                  else:                

​     record.color_avatar = "#FA7070"  # Red color


In this case, I call the "color_avatar" field on tags "color" in calendar view,  the badge colors automatically change based on the status field, but the highlight of the badges does not change based on the badges. Is it possible to change the highlight of the badges, or if not possible, can I delete the highlight? Thanks!

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
سبتمبر 20
3751
1
يونيو 23
3409
1
فبراير 18
2490
0
نوفمبر 17
3207
1
يناير 24
1331