parameters: (self, args, offset=0, limit=None, order=None, count=False, access_rights_uid=None)
return_statement: return super(PhoneBlackList, self)._search(new_args, offset=offset, limit=limit, order=order, count=count, access_rights_uid=access_rights_uid)
docstring: Override _search in order to grep search on sanitized number field
docstring_summary: Override _search in order to grep search on sanitized number field
docstring_tokens: Override _search in order to grep search on sanitized number field
function: def _search(self, args, offset=0, limit=None, order=None, count=False, access_rights_uid=None):
          """ Override _search in order to grep search on sanitized number field """
          if args:
              new_args = []
              for arg in args:
                  if isinstance(arg, (list, tuple)) and arg[0] == 'number' and isinstance(arg[2], str):
                      number = arg[2]
                      sanitized = phone_validation.phone_sanitize_numbers_w_record([number], self.env.user)[number]['sanitized']
                      if sanitized:
                          new_args.append([arg[0], arg[1], sanitized])
                      else:
                          new_args.append(arg)
                  else:
                      new_args.append(arg)
          else:
              new_args = args
          return super(PhoneBlackList, self)._search(new_args, offset=offset, limit=limit, order=order, count=count, access_rights_uid=access_rights_uid)
function_tokens: def _search ( self , args , offset = 0 , limit = None , order = None , count = False , access_rights_uid = None ) : if args : new_args = [ ] for arg in args : if isinstance ( arg , ( list , tuple ) ) and arg [ 0 ] == 'number' and isinstance ( arg [ 2 ] , str ) : number = arg [ 2 ] sanitized = phone_validation . phone_sanitize_numbers_w_record ( [ number ] , self . env . user ) [ number ] [ 'sanitized' ] if sanitized : new_args . append ( [ arg [ 0 ] , arg [ 1 ] , sanitized ] ) else : new_args . append ( arg ) else : new_args . append ( arg ) else : new_args = args return super ( PhoneBlackList , self ) . _search ( new_args , offset = offset , limit = limit , order = order , count = count , access_rights_uid = access_rights_uid )