Browse Source

[MIG] b_shift : adapt kanban colors

pull/143/head
Elouan Le Bars 5 years ago
parent
commit
0179472053
  1. 10
      beesdoo_shift/models/task.py

10
beesdoo_shift/models/task.py

@ -56,12 +56,12 @@ class Task(models.Model):
def _compute_color(self): def _compute_color(self):
color_mapping = { color_mapping = {
"draft": 0, "draft": 0,
"open": 1,
"done": 5,
"absent_2": 2,
"absent_1": 7,
"open": 0,
"done": 10,
"absent_2": 1,
"absent_1": 2,
"absent_0": 3, "absent_0": 3,
"cancel": 9,
"cancel": 5,
} }
for rec in self: for rec in self:
rec.color = color_mapping[rec.state] rec.color = color_mapping[rec.state]

Loading…
Cancel
Save