Added dynamic view title when employee is in context.

This commit is contained in:
Bertrand Chenal committed 2008-06-03 15:27:37 +02:00
1 parent 65166e5f56
commit fa738cbc3f
1 file changed
+9
+9
View File
@@ -50,6 +50,15 @@ class Line(OSV):
return context['date']
return datetime.date.today()
def view_header_get(self, cursor, user, value, view_type='form',
context=None):
if not context.get('employee'):
return False
employee_obj = self.pool.get('company.employee')
employee = employee_obj.browse(cursor, user, context['employee'],
context=context)
return value + " (" + employee.name + ")"
Line()