parameters: (self, records, value)
return_statement: return result
docstring: Update the cached value of ``self`` for ``records`` with ``value``,
              and return whether everything is in cache.
docstring_summary: Update the cached value of ``self`` for ``records`` with ``value``,
              and return whether everything is in cache.
docstring_tokens: Update the cached value of self for records with value and return whether everything is in cache .
function: def _update(self, records, value):
          """ Update the cached value of ``self`` for ``records`` with ``value``,
              and return whether everything is in cache.
          """
          if not isinstance(records, BaseModel):
              # the inverse of self is a non-relational field; `value` is a
              # corecord that refers to `records` by an integer field
              model = value.env[self.model_name]
              domain = self.domain(model) if callable(self.domain) else self.domain
              if not value.filtered_domain(domain):
                  return
              records = model.browse(records)
  
          result = True
  
          if value:
              cache = records.env.cache
              for record in records:
                  if cache.contains(record, self):
                      val = self.convert_to_cache(record[self.name] | value, record, validate=False)
                      cache.set(record, self, val)
                  else:
                      result = False
              records.modified([self.name])
  
          return result
function_tokens: def _update ( self , records , value ) : if not isinstance ( records , BaseModel ) : # the inverse of self is a non-relational field; `value` is a # corecord that refers to `records` by an integer field model = value . env [ self . model_name ] domain = self . domain ( model ) if callable ( self . domain ) else self . domain if not value . filtered_domain ( domain ) : return records = model . browse ( records ) result = True if value : cache = records . env . cache for record in records : if cache . contains ( record , self ) : val = self . convert_to_cache ( record [ self . name ] | value , record , validate = False ) cache . set ( record , self , val ) else : result = False records . modified ( [ self . name ] ) return result