From 1fce26620cf8ab4e30859fe4067454232b57b5cf Mon Sep 17 00:00:00 2001 From: odoo-pda Date: Fri, 13 Mar 2020 17:41:38 +0100 Subject: [PATCH] [FIX] templates and beesdoo_shift, [ADD] small changes on macavrac_base --- beesdoo_shift/models/task.py | 6 +++--- .../views/my_shift_website_templates.xml | 18 +++++++++--------- .../views/shift_website_templates.xml | 14 ++++++++------ macavrac_base/views/res_partner.xml | 6 +++++- 4 files changed, 25 insertions(+), 19 deletions(-) diff --git a/beesdoo_shift/models/task.py b/beesdoo_shift/models/task.py index 0215fdb..87fc054 100644 --- a/beesdoo_shift/models/task.py +++ b/beesdoo_shift/models/task.py @@ -27,7 +27,7 @@ class Task(models.Model): ("cancel","Cancelled") ] - def _get_color_mapping(state): + def _get_color_mapping(self, state): return { "draft": 0, "open": 1, @@ -37,7 +37,7 @@ class Task(models.Model): "cancel": 9, }[state] - def _get_final_state(): + def _get_final_state(self): return ["done", "absent", "excused"] name = fields.Char(track_visibility='always') @@ -78,7 +78,7 @@ class Task(models.Model): @api.depends("state") def _compute_color(self): for rec in self: - rec.color = self._state_color_mapping(rec.state) + rec.color = self._get_color_mapping(rec.state) def _compensation_validation(self, task): """ diff --git a/beesdoo_website_shift/views/my_shift_website_templates.xml b/beesdoo_website_shift/views/my_shift_website_templates.xml index ed5b8e6..9a6c102 100644 --- a/beesdoo_website_shift/views/my_shift_website_templates.xml +++ b/beesdoo_website_shift/views/my_shift_website_templates.xml @@ -6,9 +6,9 @@ -