OpenUpgrade mailing list archives
openupgrade@odoo-community.org
Browse archives
RE: Migration 11 to 12 With Upenupgrade [Logs as text]
byI have executed your last command but I am getting the following error
etiodoo@ubuntu:/var/tmp/openupgrade$ /opt/odoo/odoo11-venv/bin/python3 ./odoo-bin -r "odoo" -w 'odoo' --db_host "127.0.0.1" -d migration-db -c /etc/openupgrade.conf --update all --stop-after-init
ERROR: couldn't create the logfile directory. Logging to the standard output.
2021-04-29 16:05:34,270 2835 INFO ? odoo: Odoo version 12.0
2021-04-29 16:05:34,270 2835 INFO ? odoo: Using configuration file at /etc/openupgrade.conf
2021-04-29 16:05:34,270 2835 INFO ? odoo: addons paths: ['/home/etiodoo/.local/share/Odoo/addons/12.0', '/var/tmp/openupgrade/odoo/addons', '/var/tmp/openupgrade/addons']
2021-04-29 16:05:34,270 2835 INFO ? odoo: database: odoo@127.0.0.1:default
2021-04-29 16:05:34,361 2835 CRITICAL ? odoo.modules.module: Couldn't load module base
2021-04-29 16:05:34,361 2835 CRITICAL ? odoo.modules.module: module 'odoo.tools' has no attribute 'yaml_import'
2021-04-29 16:05:34,361 2835 ERROR ? odoo.service.server: Failed to load server-wide module `base`.
Traceback (most recent call last):
File "/var/tmp/openupgrade/odoo/service/server.py", line 1109, in load_server_wide_modules
odoo.modules.module.load_openerp_module(m)
File "/var/tmp/openupgrade/odoo/modules/module.py", line 368, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "/var/tmp/openupgrade/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.__dict__)
File "<string>", line 5, in <module>
File "/var/tmp/openupgrade/odoo/addons/base/models/__init__.py", line 7, in <module>
from . import ir_model
File "/var/tmp/openupgrade/odoo/addons/base/models/ir_model.py", line 17, in <module>
from openupgradelib import openupgrade
File "/opt/odoo/odoo11-venv/lib/python3.6/site-packages/openupgradelib/openupgrade.py", line 84, in <module>
yaml_import = tools.yaml_import
AttributeError: module 'odoo.tools' has no attribute 'yaml_import'
2021-04-29 16:05:34,444 2835 INFO migration-db odoo.modules.loading: loading 1 modules...
2021-04-29 16:05:34,450 2835 ERROR migration-db odoo.modules.migration: module base: Each pre-migration file must have a "migrate(cr, installed_version)" function
2021-04-29 16:05:34,452 2835 INFO migration-db odoo.modules.registry: module base: creating or updating database tables
2021-04-29 16:05:34,453 2835 ERROR migration-db odoo.sql_db: bad query:
SELECT c.relname
FROM pg_class c
JOIN pg_namespace n ON (n.oid = c.relnamespace)
WHERE c.relname IN ()
AND c.relkind IN ('r', 'v', 'm')
AND n.nspname = 'public'
ERROR: syntax error at or near ")"
LINE 5: WHERE c.relname IN ()
^
2021-04-29 16:05:34,454 2835 ERROR migration-db odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/var/tmp/openupgrade/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/var/tmp/openupgrade/odoo/modules/loading.py", line 414, in load_modules
report=report, models_to_check=models_to_check, upg_registry=upg_registry)
File "/var/tmp/openupgrade/odoo/modules/loading.py", line 222, in load_module_graph
registry.init_models(cr, model_names, {'module': package.name})
File "/var/tmp/openupgrade/odoo/modules/registry.py", line 332, in init_models
self.check_tables_exist(cr)
File "/var/tmp/openupgrade/odoo/modules/registry.py", line 340, in check_tables_exist
missing_tables = set(table2model).difference(existing_tables(cr, table2model))
File "/var/tmp/openupgrade/odoo/tools/sql.py", line 27, in existing_tables
cr.execute(query, [tuple(tablenames)])
File "/var/tmp/openupgrade/odoo/sql_db.py", line 148, in wrapper
return f(self, *args, **kwargs)
File "/var/tmp/openupgrade/odoo/sql_db.py", line 225, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: syntax error at or near ")"
LINE 5: WHERE c.relname IN ()
^
2021-04-29 16:05:34,456 2835 CRITICAL migration-db odoo.service.server: Failed to initialize database `migration-db`.
Traceback (most recent call last):
File "/var/tmp/openupgrade/odoo/service/server.py", line 1162, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/var/tmp/openupgrade/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/var/tmp/openupgrade/odoo/modules/loading.py", line 414, in load_modules
report=report, models_to_check=models_to_check, upg_registry=upg_registry)
File "/var/tmp/openupgrade/odoo/modules/loading.py", line 222, in load_module_graph
registry.init_models(cr, model_names, {'module': package.name})
File "/var/tmp/openupgrade/odoo/modules/registry.py", line 332, in init_models
self.check_tables_exist(cr)
File "/var/tmp/openupgrade/odoo/modules/registry.py", line 340, in check_tables_exist
missing_tables = set(table2model).difference(existing_tables(cr, table2model))
File "/var/tmp/openupgrade/odoo/tools/sql.py", line 27, in existing_tables
cr.execute(query, [tuple(tablenames)])
File "/var/tmp/openupgrade/odoo/sql_db.py", line 148, in wrapper
return f(self, *args, **kwargs)
File "/var/tmp/openupgrade/odoo/sql_db.py", line 225, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: syntax error at or near ")"
LINE 5: WHERE c.relname IN ()
From: Matt Taylor <matt454357@gmail.com>
Sent: Wednesday, April 28, 2021 8:32 PM
To: OpenUpgrade <openupgrade@odoo-community.org>
Subject: Re: Migration 11 to 12 With Upenupgrade [Logs as text]
Sorry, I missed an important part of that example command:
etiodoo@ubuntu:/var/tmp/openupgrade$ /opt/odoo/odoo11-venv/bin/python3 ./odoo-bin -r "odoo" -w 'odoo' --db_host "127.0.0.1" -d migration-db -c /etc/openupgrade.conf --update all --stop-after-init
Matt
On Mon, Apr 19, 2021 at 7:04 AM Matt Taylor <matt454357@gmail.com> wrote:
The command is executing odoo version 11.
I think you should be executing OpenUpgrade version 12, like this:
etiodoo@ubuntu:/var/tmp/openupgrade$ /opt/odoo/odoo11-venv/bin/python3 -r "odoo" -w 'odoo' --db_host "127.0.0.1" -d migration-db -c /etc/openupgrade.conf --update all --stop-after-init
Matt
On Thu, Apr 15, 2021 at 5:12 AM <asbah@eti.net.gn> wrote:
Hello,
I want to upgrade odoo 11 to odoo 12 with upenupgrade.
Here my config file content
[options]
db_host = False
db_port = False
db_user = odoo
db_password = odoo
addons_path = /var/tmp/openupgrade/odoo/addons,/var/tmp/openupgrade/addons
logfile = /var/log/odoo/odoo11.log
…and here the command line
./odoo11-venv/bin/python3 ./odoo11/odoo-bin -r "odoo" -w 'odoo' --db_host "127.0.0.1" -d migration-db -c /etc/openupgrade.conf --update all --stop-after-init
I get this error
etiodoo@ubuntu:/opt/odoo$ ./odoo11-venv/bin/python3 ./odoo11/odoo-bin -r "odoo" -w 'odoo' --db_host "127.0.0.1" -d migration-db -c /etc/openupgrade.conf --update all --stop-after-init
ERROR: couldn't create the logfile directory. Logging to the standard output.
2021-04-15 10:57:15,551 2588 INFO ? odoo: Odoo version 11.0
2021-04-15 10:57:15,552 2588 INFO ? odoo: Using configuration file at /etc/openupgrade.conf
2021-04-15 10:57:15,552 2588 INFO ? odoo: addons paths: ['/home/etiodoo/.local/share/Odoo/addons/11.0', '/var/tmp/openupgrade/odoo/addons', '/var/tmp/openupgrade/addons', '/opt/odoo/odoo11/odoo/addons']
2021-04-15 10:57:15,552 2588 INFO ? odoo: database: odoo@127.0.0.1:default
2021-04-15 10:57:15,682 2588 INFO migration-db odoo.modules.loading: loading 1 modules...
2021-04-15 10:57:15,743 2588 CRITICAL migration-db odoo.modules.module: Couldn't load module base
2021-04-15 10:57:15,743 2588 CRITICAL migration-db odoo.modules.module: cannot import name 'lazy'
2021-04-15 10:57:15,747 2588 WARNING migration-db odoo.modules.loading: Transient module states were reset
2021-04-15 10:57:15,748 2588 ERROR migration-db odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/opt/odoo/odoo11/odoo/modules/registry.py", line 85, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/odoo11/odoo/modules/loading.py", line 324, in load_modules
report=report, models_to_check=models_to_check)
File "/opt/odoo/odoo11/odoo/modules/loading.py", line 137, in load_module_graph
load_openerp_module(package.name)
File "/opt/odoo/odoo11/odoo/modules/module.py", line 368, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "/opt/odoo/odoo11/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.__dict__)
File "<string>", line 4, in <module>
File "/var/tmp/openupgrade/odoo/addons/base/controllers/__init__.py", line 1, in <module>
from . import rpc
File "/var/tmp/openupgrade/odoo/addons/base/controllers/rpc.py", line 10, in <module>
from odoo.tools import lazy
ImportError: cannot import name 'lazy'
2021-04-15 10:57:15,751 2588 CRITICAL migration-db odoo.service.server: Failed to initialize database `migration-db`.
Traceback (most recent call last):
File "/opt/odoo/odoo11/odoo/service/server.py", line 1054, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/opt/odoo/odoo11/odoo/modules/registry.py", line 85, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/odoo11/odoo/modules/loading.py", line 324, in load_modules
report=report, models_to_check=models_to_check)
File "/opt/odoo/odoo11/odoo/modules/loading.py", line 137, in load_module_graph
load_openerp_module(package.name)
File "/opt/odoo/odoo11/odoo/modules/module.py", line 368, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "/opt/odoo/odoo11/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.__dict__)
File "<string>", line 4, in <module>
File "/var/tmp/openupgrade/odoo/addons/base/controllers/__init__.py", line 1, in <module>
from . import rpc
File "/var/tmp/openupgrade/odoo/addons/base/controllers/rpc.py", line 10, in <module>
from odoo.tools import lazy
ImportError: cannot import name 'lazy'
2021-04-15 10:57:15,751 2588 INFO migration-db odoo.service.server: Initiating shutdown
2021-04-15 10:57:15,752 2588 INFO migration-db odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
But when I use the configuration [Without this /var/tmp/openupgrade/odoo/addons]
[options]
db_host = False
db_port = False
db_user = odoo
db_password = odoo
addons_path = /var/tmp/openupgrade/addons
logfile = /var/log/odoo/odoo11.log
I got this [I have just added the error part of the log]
2021-04-15 10:59:12,564 2597 ERROR migration-db odoo.modules.graph: module website_rating: Unmet dependencies: website_mail
2021-04-15 10:59:12,564 2597 ERROR migration-db odoo.modules.graph: module product: Unmet dependencies: uom
2021-04-15 10:59:12,565 2597 ERROR migration-db odoo.modules.graph: module crm: Unmet dependencies: digest
2021-04-15 10:59:12,565 2597 ERROR migration-db odoo.modules.graph: module crm_phone_validation: Unmet dependencies: crm
2021-04-15 10:59:12,565 2597 ERROR migration-db odoo.modules.graph: module pad_project: Unmet dependencies: project
2021-04-15 10:59:12,565 2597 ERROR migration-db odoo.modules.graph: module website_theme_install: Unmet dependencies: website
2021-04-15 10:59:12,565 2597 ERROR migration-db odoo.modules.graph: module analytic: Unmet dependencies: uom
2021-04-15 10:59:12,565 2597 ERROR migration-db odoo.modules.graph: module hr_timesheet: Unmet dependencies: analytic, project, uom
2021-04-15 10:59:12,565 2597 ERROR migration-db odoo.modules.graph: module theme_default: Unmet dependencies: website, website_theme_install
2021-04-15 10:59:12,566 2597 ERROR migration-db odoo.modules.graph: module crm_project: Unmet dependencies: crm, project
2021-04-15 10:59:12,566 2597 ERROR migration-db odoo.modules.graph: module website_mail: Unmet dependencies: website
2021-04-15 10:59:12,566 2597 ERROR migration-db odoo.modules.graph: module website: Unmet dependencies: social_media
2021-04-15 10:59:12,566 2597 ERROR migration-db odoo.modules.graph: module project: Unmet dependencies: digest
2021-04-15 10:59:12,574 2597 INFO migration-db odoo.modules.loading: loading 36 modules...
2021-04-15 10:59:12,608 2597 CRITICAL migration-db odoo.modules.module: Couldn't load module decimal_precision
2021-04-15 10:59:12,608 2597 CRITICAL migration-db odoo.modules.module: module 'odoo.api' has no attribute 'model_create_multi'
2021-04-15 10:59:12,612 2597 WARNING migration-db odoo.modules.loading: Transient module states were reset
2021-04-15 10:59:12,613 2597 ERROR migration-db odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/opt/odoo/odoo11/odoo/modules/registry.py", line 85, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/odoo11/odoo/modules/loading.py", line 379, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/opt/odoo/odoo11/odoo/modules/loading.py", line 274, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/opt/odoo/odoo11/odoo/modules/loading.py", line 137, in load_module_graph
load_openerp_module(package.name)
File "/opt/odoo/odoo11/odoo/modules/module.py", line 368, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "/opt/odoo/odoo11/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.__dict__)
File "<string>", line 5, in <module>
File "/var/tmp/openupgrade/addons/decimal_precision/models/__init__.py", line 2, in <module>
from . import decimal_precision
File "/var/tmp/openupgrade/addons/decimal_precision/models/decimal_precision.py", line 6, in <module>
class DecimalPrecision(models.Model):
File "/var/tmp/openupgrade/addons/decimal_precision/models/decimal_precision.py", line 29, in DecimalPrecision
@api.model_create_multi
AttributeError: module 'odoo.api' has no attribute 'model_create_multi'
2021-04-15 10:59:12,617 2597 CRITICAL migration-db odoo.service.server: Failed to initialize database `migration-db`.
Traceback (most recent call last):
File "/opt/odoo/odoo11/odoo/service/server.py", line 1054, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/opt/odoo/odoo11/odoo/modules/registry.py", line 85, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/odoo11/odoo/modules/loading.py", line 379, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/opt/odoo/odoo11/odoo/modules/loading.py", line 274, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/opt/odoo/odoo11/odoo/modules/loading.py", line 137, in load_module_graph
load_openerp_module(package.name)
File "/opt/odoo/odoo11/odoo/modules/module.py", line 368, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "/opt/odoo/odoo11/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.__dict__)
File "<string>", line 5, in <module>
File "/var/tmp/openupgrade/addons/decimal_precision/models/__init__.py", line 2, in <module>
from . import decimal_precision
File "/var/tmp/openupgrade/addons/decimal_precision/models/decimal_precision.py", line 6, in <module>
class DecimalPrecision(models.Model):
File "/var/tmp/openupgrade/addons/decimal_precision/models/decimal_precision.py", line 29, in DecimalPrecision
@api.model_create_multi
AttributeError: module 'odoo.api' has no attribute 'model_create_multi'
2021-04-15 10:59:12,622 2597 INFO migration-db odoo.service.server: Initiating shutdown
2021-04-15 10:59:12,622 2597 INFO migration-db odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
I have even tried with this
[options]
db_host = False
db_port = False
db_user = odoo
db_password = odoo
addons_path = /var/tmp/openupgrade/addons
logfile = /var/log/odoo/odoo11.log
[openupgrade]
autoinstall = {'project':['digest'],'crm':['digest']}
force_deps = {'project':['digest'],'crm':['digest']}
But I got the above error.
Why it keeps telling me that project module has an unmet dependencies:digest since the digest module is in the given path : /var/tmp/openupgrade/addons
_______________________________________________
Mailing-List: https://odoo-community.org/groups/openupgrade-87
Post to: mailto:openupgrade@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/openupgrade-87
Post to: mailto:openupgrade@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe