Skip to content

Commit

Permalink
Merge pull request #197 from coopdevs/feature/translate_shift_shift_s…
Browse files Browse the repository at this point in the history
…tatus

Translate Status field in beesdoo.shift.shift
  • Loading branch information
robinkeunen authored Oct 26, 2020
2 parents 7b212f0 + ddd6f9b commit a8714f8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
11 changes: 6 additions & 5 deletions beesdoo_shift/models/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo.tools.translate import _


class Task(models.Model):
Expand All @@ -19,11 +20,11 @@ class Task(models.Model):
##################################
def _get_selection_status(self):
return [
("open", "Confirmed"),
("done", "Attended"),
("absent", "Absent"),
("excused", "Excused"),
("cancel", "Cancelled"),
("open", _("Confirmed")),
("done", _("Attended")),
("absent", _("Absent")),
("excused", _("Excused")),
("cancel", _("Cancelled")),
]

def _get_color_mapping(self, state):
Expand Down
13 changes: 7 additions & 6 deletions beesdoo_worker_status/models/task.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from odoo import fields, models
from odoo.tools.translate import _


class Task(models.Model):
Expand All @@ -10,12 +11,12 @@ class Task(models.Model):

def _get_selection_status(self):
return [
("open", "Confirmed"),
("done", "Attended"),
("absent_2", "Absent - 2 compensations"),
("absent_1", "Absent - 1 compensation"),
("absent_0", "Absent - 0 compensation"),
("cancel", "Cancelled"),
("open", _("Confirmed")),
("done", _("Attended")),
("absent_2", _("Absent - 2 compensations")),
("absent_1", _("Absent - 1 compensation")),
("absent_0", _("Absent - 0 compensation")),
("cancel", _("Cancelled")),
]

def _get_color_mapping(self, state):
Expand Down

0 comments on commit a8714f8

Please sign in to comment.