c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #26605
[Bug 798190] [NEW] hr_timesheet_sheet: can not write attendance
Public bug reported:
Exception is thrown when there is no sheet_id linked
def write(self, cr, uid, ids, vals, context=None):
if context is None:
context = {}
self._check(cr, uid, ids) <-- exception
res = super(hr_attendance,self).write(cr, uid, ids, vals, context=context)
.
.
.
_check should be adapted like other methods
def _check(self, cr, uid, ids, context=None):
if context is None:
context = {}
if 'sheet_id' in context:
for att in self.browse(cr, uid, ids, context=context):
if att.sheet_id and att.sheet_id.state not in ('draft', 'new'):
raise osv.except_osv(_('Error !'), _('You cannot modify an entry in a confirmed timesheet !'))
return True
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/798190
Title:
hr_timesheet_sheet: can not write attendance
Status in OpenERP Modules (addons):
New
Bug description:
Exception is thrown when there is no sheet_id linked
def write(self, cr, uid, ids, vals, context=None):
if context is None:
context = {}
self._check(cr, uid, ids) <-- exception
res = super(hr_attendance,self).write(cr, uid, ids, vals, context=context)
.
.
.
_check should be adapted like other methods
def _check(self, cr, uid, ids, context=None):
if context is None:
context = {}
if 'sheet_id' in context:
for att in self.browse(cr, uid, ids, context=context):
if att.sheet_id and att.sheet_id.state not in ('draft', 'new'):
raise osv.except_osv(_('Error !'), _('You cannot modify an entry in a confirmed timesheet !'))
return True
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/798190/+subscriptions
Follow ups
-
[Bug 798190] Re: hr_timesheet_sheet: can not write attendance
From: tfr (Openerp), 2011-07-01
-
[Bug 798190] Re: hr_timesheet_sheet: can not write attendance
From: Bharat Devnani (Open ERP), 2011-07-01
-
[Bug 798190] Re: hr_timesheet_sheet: can not write attendance
From: Launchpad Bug Tracker, 2011-07-01
-
[Bug 798190] Re: hr_timesheet_sheet: can not write attendance
From: Bharat Devnani (Open ERP), 2011-07-01
-
[Bug 798190] Re: hr_timesheet_sheet: can not write attendance
From: Bharat Devnani (Open ERP), 2011-07-01
-
[Bug 798190] Re: hr_timesheet_sheet: can not write attendance
From: Mustufa Rangwala (Open ERP), 2011-07-01
-
[Bug 798190] Re: hr_timesheet_sheet: can not write attendance
From: Amit Parik (OpenERP), 2011-06-24
-
[Bug 798190] Re: hr_timesheet_sheet: can not write attendance
From: Amit Parik (OpenERP), 2011-06-24
-
[Bug 798190] Re: hr_timesheet_sheet: can not write attendance
From: Wolfgang Taferner [TaPo-IT], 2011-06-22
-
[Bug 798190] Re: hr_timesheet_sheet: can not write attendance
From: Wolfgang Taferner [TaPo-IT], 2011-06-22
-
[Bug 798190] Re: hr_timesheet_sheet: can not write attendance
From: Wolfgang Taferner [TaPo-IT], 2011-06-22
-
[Bug 798190] Re: hr_timesheet_sheet: can not write attendance
From: Vishal Parmar(Open ERP), 2011-06-21
-
[Bug 798190] Re: hr_timesheet_sheet: can not write attendance
From: Vishal Parmar(Open ERP), 2011-06-21
-
[Bug 798190] [NEW] hr_timesheet_sheet: can not write attendance
From: Wolfgang Taferner [TaPo-IT], 2011-06-16
References