Error upgrading l10n.fr.intrastat.product.declaration
Closed this issue · 1 comments
Module
l10n_fr_intrastat_product
Describe the bug
Hello,
I'm trying to upgrade an existing EE DB from v15 to v17. I pull alexis's PR for the l10n_fr_intrastat_product. I can install it in a fresh DB but not with an existing one. When doing so I get this error:
KeyError: 'l10n.fr.intrastat.product.declaration'
Here is the complete error stack
2024-05-02 16:02:53,508 1 INFO localhost odoo.addons.base.models.ir_model: Deleting 18156@ir.model.fields (l10n_fr_intrastat_product.field_l10n_fr_intrastat_product_declaration__num_decl_lines)
2024-05-02 16:02:53,517 1 WARNING localhost odoo.modules.loading: Transient module states were reset
2024-05-02 16:02:53,518 1 ERROR localhost odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 113, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 536, in load_modules
env['ir.model.data']._process_end(processed_modules)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_model.py", line 2564, in _process_end
self._process_end_unlink_record(record)
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_model_data.py", line 36, in _process_end_unlink_record
return super()._process_end_unlink_record(record)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_model.py", line 2493, in _process_end_unlink_record
record.unlink()
File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/ir_model_fields.py", line 52, in unlink
'sequence': self.env[field.model_id.model]._mail_track_get_field_sequence(field.name),
File "/usr/lib/python3/dist-packages/odoo/api.py", line 534, in getitem
return self.registry[model_name](self, (), ())
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 213, in getitem
return self.models[model_name]
KeyError: 'l10n.fr.intrastat.product.declaration'
2024-05-02 16:02:53,544 1 CRITICAL localhost odoo.service.server: Failed to initialize database localhost
.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 1302, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "", line 2, in new
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 113, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 536, in load_modules
env['ir.model.data']._process_end(processed_modules)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_model.py", line 2564, in _process_end
self._process_end_unlink_record(record)
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_model_data.py", line 36, in _process_end_unlink_record
return super()._process_end_unlink_record(record)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_model.py", line 2493, in _process_end_unlink_record
record.unlink()
File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/ir_model_fields.py", line 52, in unlink
'sequence': self.env[field.model_id.model]._mail_track_get_field_sequence(field.name),
File "/usr/lib/python3/dist-packages/odoo/api.py", line 534, in getitem
return self.registry[model_name](self, (), ())
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 213, in getitem
return self.models[model_name]
KeyError: 'l10n.fr.intrastat.product.declaration'
Steps to reproduce the behavior:
Upgrade DB from V15 to V17
Hello, I'm having the same issue during upgrade between Odoo 15 to Odoo 17, can you help me solve the problem ?
Thank you very much