OCA/account-financial-tools

[15] account_move_force_removal - error when updating

fgarcia-humanoide opened this issue · 1 comments

Module

account_move_force_removal

Describe the bug

Updating all modules and then this error appears. Without this module there is no error in de update.

2022-05-08 09:01:24,642 1678 INFO demo_plantilla odoo.modules.registry: module account_move_force_removal: creating or updating database tables
2022-05-08 09:01:24,765 1678 INFO demo_plantilla odoo.modules.loading: loading account_move_force_removal/security/account_move_force_removal_security.xml
2022-05-08 09:01:24,784 1678 INFO demo_plantilla odoo.modules.migration: module account_move_force_removal: Running migration [15.0.1.0.1>] post-migration
2022-05-08 09:01:24,787 1678 WARNING demo_plantilla odoo.modules.loading: Transient module states were reset
2022-05-08 09:01:24,788 1678 ERROR demo_plantilla odoo.modules.registry: Failed to load registry
2022-05-08 09:01:24,788 1678 CRITICAL demo_plantilla odoo.service.server: Failed to initialize database demo_plantilla.
Traceback (most recent call last):
File "/opt/odoo/odoo-server/odoo/service/server.py", line 1260, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/opt/odoo/odoo-server/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/opt/odoo/odoo-server/odoo/modules/loading.py", line 470, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/opt/odoo/odoo-server/odoo/modules/loading.py", line 363, in load_marked_modules
loaded, processed = load_module_graph(
File "/opt/odoo/odoo-server/odoo/modules/loading.py", line 227, in load_module_graph
migrations.migrate_module(package, 'post')
File "/opt/odoo/odoo-server/odoo/modules/migration.py", line 180, in migrate_module
migrate(self.cr, installed_version)
File "/opt/odoo/account-financial-tools/account_move_force_removal/migrations/15.0.1.0.1/post-migration.py", line 2, in migrate
users_billing = env.ref("account.group_account_invoice").users
File "", line 2, in getattr
File "/opt/odoo/odoo-server/odoo/sql_db.py", line 89, in check
return f(self, *args, **kwargs)
File "/opt/odoo/odoo-server/odoo/sql_db.py", line 488, in getattr
return getattr(self._obj, name)
AttributeError: 'psycopg2.extensions.cursor' object has no attribute 'ref'
2022-05-08 09:01:24,791 1678 INFO demo_plantilla odoo.service.server: Stopping gracefully

To Reproduce

v15

Steps to reproduce the behavior:
git pull all odoo modules

update all
the error appears

Expected behavior
update all whithout error

Additional context
ubuntu 20.04

Closing, solved in #1393

THX for reporting.