hr_timesheet: enumerate list of month in English
authorStéphane Bidoul <stephane.bidoul@acsone.eu>
Tue, 2 Oct 2012 14:19:43 +0000 (16:19 +0200)
committerStéphane Bidoul <stephane.bidoul@acsone.eu>
Tue, 2 Oct 2012 14:19:43 +0000 (16:19 +0200)
lp bug: https://launchpad.net/bugs/1060224 fixed

bzr revid: stephane.bidoul@acsone.eu-20121002141943-efh2cea9zrkzh6u2

addons/hr_timesheet/wizard/hr_timesheet_print_employee.py
addons/hr_timesheet/wizard/hr_timesheet_print_users.py

index 75bb089..96ce23f 100644 (file)
@@ -27,8 +27,9 @@ class analytical_timesheet_employee(osv.osv_memory):
     _name = 'hr.analytical.timesheet.employee'
     _description = 'Print Employee Timesheet & Print My Timesheet'
     _columns = {
-        'month': fields.selection([(x, datetime.date(2000, x, 1).strftime('%B')) for x in range(1, 13)],
-                                  'Month', required=True),
+        'month': fields.selection([(1,'January'), (2,'February'), (3,'March'), (4,'April'),
+            (5,'May'), (6,'June'), (7,'July'), (8,'August'), (9,'September'),
+            (10,'October'), (11,'November'), (12,'December')], 'Month', required=True),
         'year': fields.integer('Year', required=True),
         'employee_id': fields.many2one('hr.employee', 'Employee', required=True)
 
index 865ccac..2a91bb6 100644 (file)
@@ -27,8 +27,9 @@ class analytical_timesheet_employees(osv.osv_memory):
     _name = 'hr.analytical.timesheet.users'
     _description = 'Print Employees Timesheet'
     _columns = {
-        'month': fields.selection([(x, datetime.date(2000, x, 1).strftime('%B')) for x in range(1, 13)],
-                                  'Month', required=True),
+        'month': fields.selection([(1,'January'), (2,'February'), (3,'March'), (4,'April'),
+            (5,'May'), (6,'June'), (7,'July'), (8,'August'), (9,'September'),
+            (10,'October'), (11,'November'), (12,'December')], 'Month', required=True),
         'year': fields.integer('Year', required=True),
         'employee_ids': fields.many2many('hr.employee', 'timesheet_employee_rel', 'timesheet_id', 'employee_id', 'employees', required=True)
                 }