summaryrefslogtreecommitdiff
path: root/addons/hr/wizard
diff options
context:
space:
mode:
authorChristophe Simonis <chs@tinyerp.com>2008-07-08 08:13:12 +0000
committerChristophe Simonis <chs@tinyerp.com>2008-07-08 08:13:12 +0000
commit1f43329f0e4828e6afd91ec25317177bb335ecf7 (patch)
tree1beaa06b981e18d560a5a282809157e9075db37b /addons/hr/wizard
parent0b1dfd702fd5b087f0e1be81ccf3ed77f0dcf3da (diff)
* translation of nearly all exceptions
* the export of translations per module take only the files of these modules bzr revid: chs@tinyerp.com-77721e34d87043c4008239f004c7c616f6d4dc82
Diffstat (limited to 'addons/hr/wizard')
-rw-r--r--addons/hr/wizard/sign_in_out.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/hr/wizard/sign_in_out.py b/addons/hr/wizard/sign_in_out.py
index a430473dccf..70b909262a8 100644
--- a/addons/hr/wizard/sign_in_out.py
+++ b/addons/hr/wizard/sign_in_out.py
@@ -30,6 +30,7 @@
import wizard
import netsvc
import time
+from tools.translate import _
si_so_form ='''<?xml version="1.0"?>
<form string="Sign in / Sign out">
@@ -76,7 +77,7 @@ def _sign_in(self, cr, uid, data, context):
emp_id = data['form']['emp_id']
if 'last_time' in data['form'] :
if data['form']['last_time'] > time.strftime('%Y-%m-%d'):
- raise wizard.except_wizard('UserError', 'The sign-out date must be in the past')
+ raise wizard.except_wizard(_('UserError'), _('The sign-out date must be in the past'))
return {'success': False}
service.execute(cr.dbname, uid, 'hr.attendance', 'create', {
'name': data['form']['last_time'],
@@ -87,7 +88,7 @@ def _sign_in(self, cr, uid, data, context):
success = service.execute(cr.dbname, uid, 'hr.employee', 'sign_in', [emp_id])
print success
except:
- raise wizard.except_wizard('UserError', 'A sign-in must be right after a sign-out !')
+ raise wizard.except_wizard(_('UserError'), _('A sign-in must be right after a sign-out !'))
return {'success': success}
def _sign_out(self, cr, uid, data, context):
@@ -95,13 +96,13 @@ def _sign_out(self, cr, uid, data, context):
emp_id = data['form']['emp_id']
if 'last_time' in data['form'] :
if data['form']['last_time'] > time.strftime('%Y-%m-%d'):
- raise wizard.except_wizard('UserError', 'The Sign-in date must be in the past')
+ 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})
try:
success = service.execute(cr.dbname, uid, 'hr.employee', 'sign_out', [emp_id])
except:
- raise wizard.except_wizard('UserError', 'A sign-out must be right after a sign-in !')
+ raise wizard.except_wizard(_('UserError'), _('A sign-out must be right after a sign-in !'))
return {'success' : success}