Add date to window name when entering timesheet
issue8541 review265711002
This commit is contained in:
1 parent
6c73600939
commit
c2cb86b071
2 files changed
+8
-1
No files matched your search
@@ -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)
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user