KeyError: 'groups' when opening Sequences or Strict Sequences

I have a Tryton instance that has been upgraded from 4.8 to 5.0, 5.2, …, 6.0 .
When I open Sequences or Strict Sequences (“Nummernkreise” bzw. “Strikte Nummernkreise”) the folllowing error comes up:

5575 140105816360704 [2021-10-19 09:33:49,943] INFO werkzeug 172.16.0.101 - - [19/Oct/2021 09:33:49] "POST /tryton_prod_itsd/ HTTP/1.1" 200 -   
5575 140105816360704 [2021-10-19 09:33:50,218] ERROR trytond.protocols.dispatcher <class 'trytond.pool.ir.sequence'>.read(*([4, 3, 2, 1, 7, 6, 5], ['active', 'company', 'id', 'name', 'sequence_type', 'type', 'company.rec_name', 'sequence_type.rec_name', 'rec_name', '_timestamp', '_write',
'_delete'], {'client': 'bb0e9f58-30f9-41b6-8239-2bad97c02d2f', 'company_filter': 'one', 'company': 1, 'company.rec_name': 'xxx', 'language': 'de', 'language_direction': 'ltr', 'groups': [1, 6, 4, 5, 7, 11, 3, 10, 2, 8, 9]}), **{}) from admin@x.x.x.x/tryton_prod_itsd/
Traceback (most recent call last):
  File "/home/tryton/tryton/tryton-server-6.0/env/lib/python3.7/site-packages/trytond/protocols/dispatcher.py", line 181, in _dispatch          
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/home/tryton/tryton/tryton-server-6.0/env/lib/python3.7/site-packages/trytond/model/modelsql.py", line 749, in read                     
    rule_domain, active_test=False, tables=rule_tables)
  File "/home/tryton/tryton/tryton-server-6.0/env/lib/python3.7/site-packages/trytond/model/modelsql.py", line 1460, in search_domain           
    expression = convert(domain)
  File "/home/tryton/tryton/tryton-server-6.0/env/lib/python3.7/site-packages/trytond/model/modelsql.py", line 1457, in convert                 
    domain[1:] if domain[0] == 'AND' else domain)))
  File "/home/tryton/tryton/tryton-server-6.0/env/lib/python3.7/site-packages/trytond/model/modelsql.py", line 1456, in <genexpr>               
    return And((convert(d) for d in (
  File "/home/tryton/tryton/tryton-server-6.0/env/lib/python3.7/site-packages/trytond/model/modelsql.py", line 1454, in convert                 
    return Or((convert(d) for d in domain[1:]))
  File "/home/tryton/tryton/tryton-server-6.0/env/lib/python3.7/site-packages/trytond/model/modelsql.py", line 1454, in <genexpr>               
    return Or((convert(d) for d in domain[1:]))
  File "/home/tryton/tryton/tryton-server-6.0/env/lib/python3.7/site-packages/trytond/model/modelsql.py", line 1457, in convert                 
    domain[1:] if domain[0] == 'AND' else domain)))
  File "/home/tryton/tryton/tryton-server-6.0/env/lib/python3.7/site-packages/trytond/model/modelsql.py", line 1456, in <genexpr>               
    return And((convert(d) for d in (
  File "/home/tryton/tryton/tryton-server-6.0/env/lib/python3.7/site-packages/trytond/model/modelsql.py", line 1446, in convert                 
    field = cls._fields[fname]
KeyError: 'groups'

With a completely new installed database, the error does not occur.
It worked at the beginning of the year, so it may have been introduced with the update 5.8 to 6.0

What can I do?

It seems you have an access rule which read the groups fields which no longer exist.
If you remove such rule it should work as expected.

Maybe it is some XML data that could not be updated by trytond-admin. So you probably need to force the update from the Administration>Models>Models>Data.

Thank you, it worked.
There were unsynced entries in Administration>Models>Models>Data.

After manually syncing each entry, I can open the Sequences mask again.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.