Browse Source

[IMP] b_shift : attendance sheet display date with ISO format

pull/143/head
Elouan Le Bars 5 years ago
parent
commit
df456cb7dd
  1. 7
      beesdoo_shift/models/attendance_sheet.py

7
beesdoo_shift/models/attendance_sheet.py

@ -268,6 +268,7 @@ class AttendanceSheet(models.Model):
return
# Compute name (not hardcorded to prevent incoherence with timezone)
# Actually not working, should depends on timezone as well
@api.depends("start_time", "end_time")
def _compute_name(self):
@ -277,10 +278,10 @@ class AttendanceSheet(models.Model):
end_time_dt = fields.Datetime.context_timestamp(self, end_time_dt)
self.name = (
start_time_dt.strftime("%d/%m/%y")
+ " | "
start_time_dt.strftime("%Y-%m-%d")
+ " "
+ start_time_dt.strftime("%H:%M")
+ "-"
+ " - "
+ end_time_dt.strftime("%H:%M")
)
return

Loading…
Cancel
Save