[FIX] hr_timesheet_sheet: Cannot use the timesheet program because of a warning message Please Enter A Value
bzr revid: ara@tinyerp.com-20110314093854-sei5y7g03h36cvk3
This commit is contained in:
parent
708c8a1cca
commit
96311d7923
|
@ -190,6 +190,10 @@ class hr_timesheet_sheet(osv.osv):
|
|||
raise osv.except_osv(_('Error !'), _('You cannot create a timesheet for an employee that does not have any user defined !'))
|
||||
if not self._sheet_date(cr, uid, ids, forced_user_id=new_user_id):
|
||||
raise osv.except_osv(_('Error !'), _('You can not have 2 timesheets that overlaps !\nPlease use the menu \'My Current Timesheet\' to avoid this problem.'))
|
||||
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).product_id:
|
||||
raise osv.except_osv(_('Error !'), _('You cannot create a timesheet for an employee that does not have any product defined !'))
|
||||
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).journal_id:
|
||||
raise osv.except_osv(_('Error !'), _('You cannot create a timesheet for an employee that does not have any analytic journal defined !'))
|
||||
return super(hr_timesheet_sheet, self).write(cr, uid, ids, vals, *args, **argv)
|
||||
|
||||
def button_confirm(self, cr, uid, ids, context=None):
|
||||
|
|
Loading…
Reference in New Issue