~domsense/domsense-agilebg-addons/6.0

« back to all changes in this revision

Viewing changes to hr_attendance_analysis/hr_attendance.py

  • Committer: eLBati
  • Date: 2012-01-16 11:08:56 UTC
  • Revision ID: lorenzo.battistini@agilebg.com-20120116110856-vh02lsyyine3dcp7
[FIX] error message

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
                if next_attendance_ids:
163
163
                    next_attendance = self.browse(cr, uid, next_attendance_ids[0])
164
164
                    if next_attendance.action == 'sign_in':
165
 
                        raise osv.except_osv(_('Error'), _('Incongruent data'))
 
165
                        raise osv.except_osv(_('Error'),
 
166
                            _('Incongruent data: sign-in %s is followed by another sign-in') % attendance.name)
166
167
                    next_attendance_date = next_attendance.name
167
168
                attendance_stop = datetime.strptime(next_attendance_date, '%Y-%m-%d %H:%M:%S')
168
169
                duration_delta = attendance_stop - attendance_start