title: ValueError: Compute method failed to assign custom.module(11,).historial_ids in Odoo 14
body: <p>I've only been learning odoo-14 for 2 weeks.
  There are three compute functions in my code. But I got the error:</p>
  <pre><code>Odoo Server Error  
  Traceback (most recent call last):
   File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/addons/base/models/ir_http.py&quot;, line 237, in _dispatch
      result = request.dispatch()
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/http.py&quot;, line 685, in dispatch
      result = self._call_function(**self.params)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/http.py&quot;, line 361, in _call_function
      return checked_call(self.db, *args, **kwargs)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/service/model.py&quot;, line 94, in wrapper
      return f(dbname, *args, **kwargs)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/http.py&quot;, line 349, in checked_call
      result = self.endpoint(*a, **kw)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/http.py&quot;, line 914, in __call__
      return self.method(*args, **kw)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/http.py&quot;, line 533, in response_wrap
      response = f(*args, **kw)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/addons/web/controllers/main.py&quot;, line 1394, in call_kw
      return self._call_kw(model, method, args, kwargs)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/addons/web/controllers/main.py&quot;, line 1386, in _call_kw
      return call_kw(request.env[model], method, args, kwargs)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/api.py&quot;, line 399, in call_kw
      result = _call_kw_multi(method, model, args, kwargs)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/api.py&quot;, line 386, in _call_kw_multi
      result = method(recs, *args, **kwargs)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/models.py&quot;, line 3022, in read
      return self._read_format(fnames=fields, load=load)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/models.py&quot;, line 3042, in _read_format
      vals[name] = convert(record[name], record, use_name_get)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/models.py&quot;, line 5686, in __getitem__
      return self._fields[key].__get__(self, type(self))
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/fields.py&quot;, line 3149, in __get__
      return super().__get__(records, owner)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/fields.py&quot;, line 2485, in __get__
      return super().__get__(records, owner)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/fields.py&quot;, line 1028, in __get__
      raise ValueError(&quot;Compute method failed to assign %s.%s&quot; % (record, self.name))
  Exception
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/http.py&quot;, line 641, in _handle_exception
      return super(JsonRequest, self)._handle_exception(exception)
    File &quot;/home/joseangel.lopez/DESARROLLO/PycharmProjects/FacturaElectronica/trainingOdoo/odoo-14.0/odoo/http.py&quot;, line 317, in _handle_exception
      raise exception.with_traceback(None) from new_cause
  ValueError: Compute method failed to assign custom.module.solicitud(11,).historial_ids
  </code></pre>
  <p>#################################My model#########################################</p>
  <pre><code>class CustomModuleSolicitud(models.Model):
      _name = 'custom.module.solicitud'
      _description = &quot;Solicitud&quot;
      _order = &quot;create_date desc, id desc&quot;
  
  ....
      state = fields.Selection([('pendiente', 'Pendiente'), ('actualizado', 'Actualizado')],
                               string='Estado', default='pendiente', readonly=True, required=True)
      agrupacion = fields.Char(string=&quot;Agrupación&quot;, readonly=True)
      historial_ids = fields.One2many(comodel_name='custom.module.solicitud', string=&quot;Solicitudes&quot;, compute='_compute_historial')
  
  ....
  
  
      @api.depends('agrupacion')
      def _compute_historial(self):
          for r in self:
              if not r.agrupacion:
                  r.historial_ids = []
              else:
                  r.historial_ids = self.env['custom.module.solicitud'].search([('agrupacion', '=', r.agrupacion),
                                                                         ('id', '!=', r.id),
                                                                         ('state', '=', 'actualizado')])
  
  </code></pre>
  <p>I think the error is related to the field type one2many. Please help to find why i got this error.</p>