Issue migrating from 8.0 to 9.0
Hello,
using the migrate.py script to upgrade from v8.0 to v9.0, i've the following error:
2018-02-15 12:22:12,971 3112 CRITICAL test_migrated openerp.service.server: Failed to initialize database test_migrated.
Traceback (most recent call last):
File "/var/tmp/openupgrade/9.0/server/openerp/service/server.py", line 897, in preload_registries
registry = RegistryManager.new(dbname, update_module=update_module)
File "/var/tmp/openupgrade/9.0/server/openerp/modules/registry.py", line 390, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/var/tmp/openupgrade/9.0/server/openerp/modules/loading.py", line 408, in load_modules
force, status, report, loaded_modules, update_module, upg_registry)
File "/var/tmp/openupgrade/9.0/server/openerp/modules/loading.py", line 299, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks, upg_registry=upg_registry)
File "/var/tmp/openupgrade/9.0/server/openerp/modules/loading.py", line 189, in load_module_graph
migrations.migrate_module(package, 'post')
File "/var/tmp/openupgrade/9.0/server/openerp/modules/migration.py", line 169, in migrate_module
mod.migrate(self.cr, pkg.installed_version)
File "/var/tmp/openupgrade/openupgradelib/openupgradelib/openupgrade.py", line 1391, in wrapped_function
if use_env2 else cr, version)
File "/var/tmp/openupgrade/9.0/addons/account/migrations/9.0.1.1/post-migration.py", line 1021, in migrate
move_view_accounts(env)
File "/var/tmp/openupgrade/9.0/addons/account/migrations/9.0.1.1/post-migration.py", line 289, in move_view_accounts
WHERE %s = 'view'""", (AsIs(openupgrade.get_legacy_name('type')),)
File "/var/tmp/openupgrade/openupgradelib/openupgradelib/openupgrade.py", line 887, in logged_query
cr.execute(query, args)
File "/var/tmp/openupgrade/9.0/server/openerp/sql_db.py", line 141, in wrapper
return f(self, *args, **kwargs)
File "/var/tmp/openupgrade/9.0/server/openerp/sql_db.py", line 220, in execute
res = self._obj.execute(query, params)
IntegrityError: update or delete on table "account_account" violates foreign key constraint "account_tax_account_id_fkey" on table "account_tax"
DETAIL: Key (id)=(451) is still referenced from table "account_tax".
The major problem is that this account_tax_account_id_fkey isn't existing on any Odoo v8.0 database.
Is someone having any idea about it? It would be great.
Thank you
You have referred a view account in your taxes in v8.
Sorry for my lack of knowledge, but could you be more precise please. I've no idea of what i should do because, there is no account_tax and no account_account with id 451....
I have been very precise: you have an account of type 'view' in any of your taxes.