Skip to content

[8.0]Error Expected singleton: account.account.type(25, 37) creating "Accounting Set-Up" #20

Description

@Nick-OpusVL

How to reproduce

  • Restore a copy of the database where this singleton error would occur
    • We don't know cause yet so can't prescribe how to set this up, but we do have a database that has this issue, but don't want to identify it in a public place such as this.
    • Internally, see T15292 for more context info on which database this refers to.
  • Install account_mtd_vat
  • Add group MTD/Administrator and MTD/User to admin account
  • Refresh browser window
  • Click Accounting -> Making Tax Digital -> MTD Set-up -> Accounting Set-up -> Create

What should happen

Should not have an error, so we can fill in fields.

What happens

In the GUI we see Odoo Warning dialogue with body Expected singleton: account.account.type(25, 37)

In the logs, we see this:

openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 546, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 583, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 319, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 118, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 316, in checked_call
    return self.endpoint(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 812, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 412, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 944, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 936, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 399, in old_api
    result = method(recs, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 5998, in onchange
    newval = record[name]
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 5654, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/usr/lib/python2.7/dist-packages/openerp/fields.py", line 838, in __get__
    self.determine_draft_value(record)
  File "/usr/lib/python2.7/dist-packages/openerp/fields.py", line 946, in determine_draft_value
    self._compute_value(record)
  File "/usr/lib/python2.7/dist-packages/openerp/fields.py", line 885, in _compute_value
    self.compute(records)
  File "/mnt/extra-addons-bundles/OpusVL_mtd/account_mtd_vat/models/hmrc_posting_configuration.py", line 39, in _compute_company_id
    ('name', '=', 'Output Tax')])
  File "/usr/lib/python2.7/dist-packages/openerp/fields.py", line 851, in __set__
    value = self.convert_to_cache(value, record)
  File "/usr/lib/python2.7/dist-packages/openerp/fields.py", line 1051, in convert_to_cache
    return int(value or 0)
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 5624, in __int__
    return self.id
  File "/usr/lib/python2.7/dist-packages/openerp/fields.py", line 1909, in __get__
    return record.ensure_one()._ids[0]
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 5320, in ensure_one
    raise except_orm("ValueError", "Expected singleton: %s" % self)
except_orm: ('ValueError', 'Expected singleton: account.account.type(25, 37)')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions