def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): #the day search support new_args = utils.deal_args_dt(cr, user, self, args, ['name'], context=context) #the date_start/end parameter for arg in new_args: if arg[0] == 'date_search_from': arg[0] = 'name' arg[1] = '>=' if arg[0] == 'date_search_to': arg[0] = 'name' arg[1] = '<=' #for the end date, need add one day to use as the end day time_obj = datetime.strptime(arg[2], DEFAULT_SERVER_DATETIME_FORMAT) time_obj += relativedelta(days=1) arg[2] = time_obj.strftime(DEFAULT_SERVER_DATETIME_FORMAT) return super(hr_attendance, self).search(cr, user, new_args, offset, limit, order, context, count)
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): #deal the 'datetime' field query new_args = utils.deal_args_dt(cr, user, self, args, ['date', 'date_done', 'mr_date_order'], context=context) #the date_start/end parameter for arg in new_args: if arg[0] == 'date_from': arg[0] = 'mr_date_order' arg[1] = '>=' if arg[0] == 'date_to': arg[0] = 'mr_date_order' arg[1] = '<=' #for the end date, need add one day to use as the end day time_obj = datetime.strptime(arg[2], DEFAULT_SERVER_DATETIME_FORMAT) time_obj += relativedelta(days=1) arg[2] = time_obj.strftime(DEFAULT_SERVER_DATETIME_FORMAT) return super(stock_mt_rpt, self).search(cr, user, new_args, offset, limit, order, context, count)
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): #the day search support new_args = utils.deal_args_dt(cr, user, self, args,['name'],context=context) #the date_start/end parameter for arg in new_args: if arg[0] == 'date_search_from': arg[0] = 'name' arg[1] = '>=' if arg[0] == 'date_search_to': arg[0] = 'name' arg[1] = '<=' #for the end date, need add one day to use as the end day time_obj = datetime.strptime(arg[2],DEFAULT_SERVER_DATETIME_FORMAT) time_obj += relativedelta(days=1) arg[2] = time_obj.strftime(DEFAULT_SERVER_DATETIME_FORMAT) return super(hr_attendance,self).search(cr, user, new_args, offset, limit, order, context, count)
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): #the day search support new_args = utils.deal_args_dt(cr, user, self, args, ['last_punch_time'], context=context) return super(hr_employee, self).search(cr, user, new_args, offset, limit, order, context, count)
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): #deal the 'datetime' field query new_args = utils.deal_args_dt(cr, user, self, args,['date', 'date_done', 'mr_date_order'],context=context) #the date_start/end parameter for arg in new_args: if arg[0] == 'date_from': arg[0] = 'mr_date_order' arg[1] = '>=' if arg[0] == 'date_to': arg[0] = 'mr_date_order' arg[1] = '<=' #for the end date, need add one day to use as the end day time_obj = datetime.strptime(arg[2],DEFAULT_SERVER_DATETIME_FORMAT) time_obj += relativedelta(days=1) arg[2] = time_obj.strftime(DEFAULT_SERVER_DATETIME_FORMAT) return super(stock_mt_rpt,self).search(cr, user, new_args, offset, limit, order, context, count)
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): #the day search support new_args = utils.deal_args_dt(cr, user, self, args,['last_punch_time'],context=context) return super(hr_employee,self).search(cr, user, new_args, offset, limit, order, context, count)