Migration from 3.6 to 6.2

I’m not sure what you mean by trytond-migration but you must execute trytond-admin --all (using the target version) with success before running the post trytond-console scripts.

With trytond-migration I meant running trytond-admin … –all

In both cases (trytond-console, trytond-migration) I am running into the mentioned issue. Somehow ir_module is expected, but there is only ir_module_module in the database.

Well this means that the upgrade to 6.0 series was not complete.
In series 3.8, the tables has been renamed: Rename ir.module.module* into ir.module* (98bcb2ee56c2) · Commits · Tryton / Tryton · GitLab (we are talking about changes made 11 years ago).

FYI: you must perform a complete upgrade to each major series.

something went wrong when I did the manual migration steps. Also the situation was a little bit confusing as chatgpt was quite sure that ir_module_module is the current correct name. Seems like it is using an old documentation. I somehow fixed this issue, by doing the manual migration again.

Now there is a new issue when running trytond-admin:

psycopg2.errors.ForeignKeyViolation: insert or update on table "ir_ui_view_tree_width" violates foreign key constraint "ir_ui_view_tree_width_field_model_name_model_fkey"
DETAIL:  Key (field, model)=(vat_code, party.party) is not present in table "ir_model_field".

Why trusting such statistic tool for real information.
LLM’s will never be a source of trust.

This is an old issue. But coming from your version I do not think it makes any sense to try to keep the tree view width preferences. So it will be simpler to just delete all records in this table.

Sometimes it helps to find a solution for a migration issue. I don’t think it’s a trivial thing to update from 10+ years old version to current version without a lot of knowledge about tryton. So I use it from time to time.

I did that, thanks.

next issue is with this xml-buttons:

<?xml version="1.0"?> Vorlage
    <record model="ir.model.button" id="sale_quote_button">
        <field name="name">Angebot</field>
        <field name="model" search="[('model', '=', 'sale.sale')]"/>
    </record>
</data>

leading to this error:

531 140341217112128 [2026-02-09 14:01:07,171] INFO trytond.modules template load template.xml 
Traceback (most recent call last): 
  File "/usr/local/lib/python3.11/dist-packages/trytond/convert.py", line 414, in parse_xmlstream 
    self.sax_parser.parse(source) 
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 111, in parse 
    xmlreader.IncrementalParser.parse(self, source) 
  File "/usr/lib/python3.11/xml/sax/xmlreader.py", line 125, in parse 
    self.feed(buffer) 
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 217, in feed 
    self._parser.Parse(data, isFinal) 
  File "../Modules/pyexpat.c", line 416, in StartElement 
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 333, in start_element 
    self._cont_handler.startElement(name, AttributesImpl(attrs)) 
  File "/usr/local/lib/python3.11/dist-packages/trytond/convert.py", line 446, in startElement 
    self.taghandler.startElement(name, attributes) 
  File "/usr/local/lib/python3.11/dist-packages/trytond/convert.py", line 255, in startElement 
    search_model = field.model_name 
                   ^^^^^^^^^^^^^^^^ 
AttributeError: 'Char' object has no attribute 'model_name' 

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

Traceback (most recent call last): 
  File "/usr/local/bin/trytond-admin", line 33, in <module> 
    admin.run(options) 
  File "/usr/local/lib/python3.11/dist-packages/trytond/admin.py", line 58, in run 
    pool.init(update=options.update, lang=list(lang), 
  File "/usr/local/lib/python3.11/dist-packages/trytond/pool.py", line 148, in init 
    restart = not load_modules( 
                  ^^^^^^^^^^^^^ 
  File "/usr/local/lib/python3.11/dist-packages/trytond/modules/__init__.py", line 482, in load_modules 
    _load_modules(update) 
  File "/usr/local/lib/python3.11/dist-packages/trytond/modules/__init__.py", line 452, in _load_modules 
    load_module_graph(graph, pool, update, lang, indexes) 
  File "/usr/local/lib/python3.11/dist-packages/trytond/modules/__init__.py", line 277, in load_module_graph 
    tryton_parser.parse_xmlstream(fp) 
  File "/usr/local/lib/python3.11/dist-packages/trytond/convert.py", line 416, in parse_xmlstream 
    raise ParsingError("in %s" % self.current_state()) from e 
trytond.convert.ParsingError: in record 'template.sale_create_template_button'

I tried to change to

<field name="model" domain="[('model', '=', 'sale.sale')]"/>

and

<field name="model">sale.sale</field>

The first is not working, the second leads to:

psycopg2.errors.ExclusionViolation: conflicting key value violates exclusion constraint "ir_model_button_name_model_exclude"
DETAIL:  Key (name, model)=(Angebot, sale.sale) conflicts with existing key (name, model)=(Angebot, sale.sale).


This is a problem in custom code.
The data must be cleaned (manually or with migration code) following the change.

1 Like

I am currently trying to find a solution for this error:

✨ Pixi task (trytond-console): trytond-console -d mydatabase -c trytond.conf
Tryton 7.8.9, Python 3.14.3 | packaged by conda-forge | (main, Feb  9 2026, 21:56:02) [GCC 14.3.0] on linux
>>> from trytond.pool import Pool
>>> Pool().get("ir.property")
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/lorenz/projects/tryton/tryton-energiebig/.pixi/envs/default/lib/python3.14/site-packages/trytond/pool.py", line 172, in get
    return self._pool[type][name]
           ~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'ir.property'

maybe I have missed something obvious.

ir.property has been removed since 4.4. So I do not know why you want to get this model in 7.8?

1 Like

thanks, I suspected that but chatgpt was insisting that ir.property is still available in tryton 7.8… Would be nice if tryton is better supported in llms. I know you already said that I should not trust these machines, but in the end for me this is often the only way to get closer to a solution of an issue.

Again I am struggeling with an issue I have no clue how to debug:

AttributeError: type object 'energiebig.configuration.value' has no attribute '_fields'

There is also another way: If you pay a service provider the money you pay for AI, perhaps they could provide the right architecture and solve your issue with less code.

1 Like

hmm personlly I prefer donations and support via the forum. But maybe you are right.