[FIX]Bug 352191 : Corrected

bzr revid: jvo@tinyerp.com-20090331113253-bxgu0qdaqjoi7psq
This commit is contained in:
Jay (Open ERP) 2009-03-31 17:02:53 +05:30
parent aaf478c220
commit 61106b0fff
1 changed files with 1 additions and 1 deletions

View File

@ -528,7 +528,7 @@ class hr_attendance(osv.osv):
raise osv.except_osv(_('Error !'), _('You cannot modify an entry in a confirmed timesheet !'))
res = super(hr_attendance,self).create(cr, uid, vals, context=context)
if 'sheet_id' in context:
if context['sheet_id'] != vals['sheet_id']:
if context['sheet_id'] != self.browse(cr, uid, res, context=context).sheet_id.id:
raise osv.except_osv(_('UserError'), _('You cannot enter an attendance ' \
'date outside the current timesheet dates!'))
return res