From 306804e28943ceb45e01f189e5574d95c84943c2 Mon Sep 17 00:00:00 2001 From: "RGA(OpenERP)" <> Date: Tue, 15 Dec 2009 13:23:30 +0530 Subject: [PATCH] [FIX] Hr_attendance : Sign out entries were not possible when we 'change work' lp bug: https://launchpad.net/bugs/493369 fixed bzr revid: jvo@tinyerp.com-20091215075330-kiokplayp0sq8ca8 --- addons/hr_attendance/wizard/sign_in_out.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/addons/hr_attendance/wizard/sign_in_out.py b/addons/hr_attendance/wizard/sign_in_out.py index b3c253219bf..fcaa456cd3c 100644 --- a/addons/hr_attendance/wizard/sign_in_out.py +++ b/addons/hr_attendance/wizard/sign_in_out.py @@ -87,7 +87,7 @@ def _sign_out(self, cr, uid, data, context): service = netsvc.LocalService('object_proxy') emp_id = data['form']['emp_id'] if 'last_time' in data['form'] : - if data['form']['last_time'] > time.strftime('%Y-%m-%d'): + if data['form']['last_time'] > time.strftime('%Y-%m-%d %H:%M:%S'): raise wizard.except_wizard(_('UserError'), _('The Sign-in date must be in the past')) return {'success': False} service.execute(cr.dbname, uid, 'hr.attendance', 'create', {'name':data['form']['last_time'], 'action':'sign_in', 'employee_id':emp_id}) @@ -100,7 +100,7 @@ def _sign_out(self, cr, uid, data, context): so_ask_form ='''
- + ''' @@ -123,7 +123,7 @@ def _si_check(self, cr, uid, data, context): si_ask_form ='''
- + ''' @@ -133,14 +133,23 @@ si_ask_fields = { 'last_time' : {'string' : "Your last sign in", 'type' : 'datetime', 'required' : True}, } +so_wo_si_form = ''' +
+