Unable to archive project


Hello Flectra community, We thought of giving a shot to flectra by using it. And unable to archive the project. Please suggest the way around. Sharing traceback.

    Traceback (most recent call last):
  File "/opt/odoo/flectra/models.py", line 4390, in ensure_one
    _id, = self._ids
ValueError: too many values to unpack (expected 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/odoo/flectra/http.py", line 653, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/flectra/http.py", line 312, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/opt/odoo/flectra/tools/pycompat.py", line 87, in reraise
    raise value
  File "/opt/odoo/flectra/http.py", line 695, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/flectra/http.py", line 344, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/flectra/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/flectra/http.py", line 337, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/flectra/http.py", line 939, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/flectra/http.py", line 517, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/addons/web/controllers/main.py", line 1094, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo/addons/web/controllers/main.py", line 1082, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/flectra/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/flectra/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/flectra/models.py", line 4273, in toggle_active
    record.active = not record.active
  File "/opt/odoo/flectra/fields.py", line 997, in __set__
    record.write({self.name: write_value})
  File "/opt/odoo/addons/project/models/project.py", line 280, in write
    self.with_context(active_test=False).mapped('tasks').write({'active': vals['active']})
  File "/opt/odoo/addons/project_scrum/models/project_sprint.py", line 568, in write
    if self.task_seq == '/':
  File "/opt/odoo/flectra/fields.py", line 952, in __get__
  File "/opt/odoo/flectra/models.py", line 4393, in ensure_one
    raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: project.task(19, 20, 22, 21, 18)


Please post the bug over here https://gitlab.com/flectra-hq/flectra/issues


Hello @parthiv Thank you so much for quick response. We have posted a bug on gitlab - https://gitlab.com/flectra-hq/flectra/issues/196