Add date to window name when entering timesheet

issue8541
review265711002
This commit is contained in:
EdbO committed 2019-07-30 23:34:10 +02:00
1 parent 6c73600939
commit c2cb86b071
2 files changed
+8 -1

No files matched your search

+2
View File
@@ -1,3 +1,5 @@
* Add date to window name when entering timesheet
Version 5.2.0 - 2019-05-06
* Bug fixes (see mercurial logs for details)
+6 -1
View File
@@ -194,6 +194,8 @@ class EnterLines(Wizard):
enter = StateAction('timesheet.act_line_form')
def do_enter(self, action):
pool = Pool()
Lang = pool.get('ir.lang')
date = self.start.date
date = Date(date.year, date.month, date.day)
action['pyson_domain'] = PYSONEncoder().encode([
@@ -206,7 +208,10 @@ class EnterLines(Wizard):
'company': self.start.employee.company.id,
'date': date,
})
action['name'] += " - " + self.start.employee.rec_name
action['name'] += ' @ %(date)s - %(employee)s' % {
'date': Lang.get().strftime(self.start.date),
'employee': self.start.employee.rec_name,
}
return action, {}
def transition_enter(self):