Uprade 6.x: Error In tag record model (convert sax)

Try upgrading some projects to 6.x, I get error that convert (sax) that try/except get message: Error In tag record model…

./trytond/bin/trytond-admin -v -c etc/server-montcau.cfg -u project sale --all -d tryton60_next

and the traceback:

[...]
If that doesn't work update the records and restart again.
27316 140637996238656 [2021-07-13 13:15:05,902] WARNING trytond.backend.postgresql.table Unable to set not null on column currency of table account_invoice_line.
Try restarting one more time.
If that doesn't work update the records and restart again.
Traceback (most recent call last):
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/convert.py", line 457, in parse_xmlstream
    self.sax_parser.parse(source)
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.7/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 471, in EndElement
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 336, in end_element
    self._cont_handler.endElement(name)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/convert.py", line 512, in endElement
    self.taghandler = self.taghandler.endElement(name)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/convert.py", line 296, in endElement
    self.model.__name__, self.values, self.xml_id)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/convert.py", line 689, in import_record
    self.create_records(model, [values], [fs_id])
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/convert.py", line 695, in create_records
    records = Model.create(vlist)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/ir/action.py", line 224, in create
    return super(ActionKeyword, cls).create(new_vlist)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/model/modelsql.py", line 159, in wrapper
    return func(cls, *args, **kwargs)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/model/modelsql.py", line 679, in create
    cls._validate(sub_records)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/model/modelstorage.py", line 79, in wrapper
    return func(*args, **kwargs)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/model/modelstorage.py", line 1325, in _validate
    value = getattr(record, field_name)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/model/fields/field.py", line 344, in __get__
    return inst.__getattr__(self.name)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/model/modelstorage.py", line 1634, in __getattr__
    read_data = self.read(list(index.keys()), list(ffields.keys()))
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/model/modelsql.py", line 687, in read
    Rule = pool.get('ir.rule')
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/pool.py", line 187, in get
    return self._pool[self.database_name][type][name]
KeyError: 'tryton60_next'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/pool.py", line 166, in init
    activatedeps=activatedeps)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/modules/__init__.py", line 437, in load_modules
    _load_modules(update)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/modules/__init__.py", line 405, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/modules/__init__.py", line 252, in load_module_graph
    tryton_parser.parse_xmlstream(fp)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/convert.py", line 459, in parse_xmlstream
    raise Exception("Error " + self.current_state()) from e
Exception: Error In tag record model ir.action.keyword with id sale.act_move_form_keyword1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./trytond/bin/trytond-admin", line 23, in <module>
    admin.run(options)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/admin.py", line 54, in run
    activatedeps=options.activatedeps)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/pool.py", line 168, in init
    del self._pool[self.database_name]
KeyError: 'tryton60_next'

Somebody know the reason I get this error? I get this error in several databases (sale, project, stock…). At the moment, some projects I solved to do the upgrade with “-u” option.

It looks like you did not execute the pre-migration statements.

Pre-migration statements are applied before do trytond-admin --all

I try to comment in sale module, the ID act_move_form_keyword1. I get other XML convert sax error. I try to comment… and finally do trytond-admin --all: upgrating is done.

Finally I revert commented XML tags, and do other trytond-admin --all: trytond-admin finish sucessfull (and new XML tags was created in ir.model.data)