[MERGE] lp:887553
bzr revid: rco@openerp.com-20111109125350-8rrbockys62pkid7
This commit is contained in:
@@ -400,7 +400,7 @@ class hr_timesheet_sheet(osv.osv):
|
||||
def _default_employee(self, cr, uid, context=None):
|
||||
emp_ids = self.pool.get('hr.employee').search(cr, uid, [('user_id','=',uid)], context=context)
|
||||
return emp_ids and emp_ids[0] or False
|
||||
|
||||
|
||||
_defaults = {
|
||||
'date_from' : _default_date_from,
|
||||
'date_current' : lambda *a: time.strftime('%Y-%m-%d'),
|
||||
@@ -416,7 +416,7 @@ class hr_timesheet_sheet(osv.osv):
|
||||
if new_user_id:
|
||||
cr.execute('SELECT id \
|
||||
FROM hr_timesheet_sheet_sheet \
|
||||
WHERE (date_from < %s and %s < date_to) \
|
||||
WHERE (date_from <= %s and %s <= date_to) \
|
||||
AND user_id=%s \
|
||||
AND id <> %s',(sheet.date_to, sheet.date_from, new_user_id, sheet.id))
|
||||
if cr.fetchall():
|
||||
|
||||
Reference in New Issue
Block a user