Skip to Content
Menu
This question has been flagged
2 Replies
3082 Views

We are trying to Migrate v13 CE to V14 CE using Open Upgraded script

We have take update from OpenUpgrade script

While Running script, I have faced some following 'event_id' related Error:

So Can any one know the solution of above Traceback error ?


Below is the Traceback attached :-  

Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/openupgradelib/openupgrade.py", line 1859, in wrapped_function
if use_env2 else cr, version)
File "/home/odoo/oca/OpenUpgrade/openupgrade_scripts/scripts/calendar/14.0.1.0/pre-migration.py", line 37, in migrate
delete_empty_event_id_partner_id_records(env)
File "/home/odoo/oca/OpenUpgrade/openupgrade_scripts/scripts/calendar/14.0.1.0/pre-migration.py", line 12, in delete_empty_event_id_partner_id_records
""",
File "/usr/local/lib/python3.6/dist-packages/openupgradelib/openupgrade.py", line 1325, in logged_query
cr.execute(query, args)
File "", line 2, in execute
File "/home/odoo/sql_db.py", line 101, in check
return f(self, args, *kwargs)
File "/home/odoo/sql_db.py", line 298, in execute
res = self._obj.execute(query, params)
psycopg2.errors.UndefinedColumn: column "event_id" does not exist
LINE 3: WHERE event_id is null OR partner_id is null
^
HINT: Perhaps you meant to reference the column "calendar_event.event_tz".

Avatar
Discard
Best Answer

Hi,

Can you send me the command lines you type?

And also show me the script you used.

Avatar
Discard
Author

Hi Jean Luc,

we have run with following command

./14/odoo-bin --addons-path=14/addons/,OpenUpgrade/,CUSTOM_MODULES --db-filter=PRODUCTION_DATABASE-v13ce --load=openupgrade_framework --upgrade-path=OpenUpgrade/openupgrade_scripts/scripts/ -u base,web,LIST_OF_INSTALLED_MODULES

Author

As a Comment: we have start with latest update of Openupgarde script but still faced following error:

021-06-10 08:55:40,289 2255 INFO V13_DB OpenUpgrade: product: post-migration script called with version 13.0.1.2

2021-06-10 08:55:40,290 2255 ERROR V13_DB odoo.sql_db: bad query:

UPDATE product_pricelist_item my_table

SET date_end =

my_table.openupgrade_legacy_14_0_date_end::TIMESTAMP AT TIME ZONE 'UTC'

FROM res_partner rp, res_users ru

WHERE my_table.openupgrade_legacy_14_0_date_end IS NOT NULL

AND my_table.user_id=ru.id

AND ru.partner_id=rp.id

AND rp.tz='US/Central';

ERROR: column my_table.user_id does not exist

LINE 7: AND my_table.user_id=ru.id

^

2021-06-10 08:55:40,290 2255 ERROR V13_DB OpenUpgrade: Error after 0:00:00.000287 running

UPDATE product_pricelist_item my_table

SET date_end =

my_table.openupgrade_legacy_14_0_date_end::TIMESTAMP AT TIME ZONE 'UTC'

FROM res_partner rp, res_users ru

WHERE my_table.openupgrade_legacy_14_0_date_end IS NOT NULL

AND my_table.user_id=ru.id

AND ru.partner_id=rp.id

AND rp.tz='US/Central';

2021-06-10 08:55:40,290 2255 ERROR V13_DB OpenUpgrade: product: error in migration script /home/odoo/oca/OpenUpgrade/openupgrade_scripts/scripts/product/14.0.1.2/post-migration.py: column my_table.user_id does not exist

LINE 7: AND my_table.user_id=ru.id

^

2021-06-10 08:55:40,290 2255 ERROR V13_DB OpenUpgrade: column my_table.user_id does not exist

LINE 7: AND my_table.user_id=ru.id

^

Traceback (most recent call last):

File "/home/odoo/modules/registry.py", line 63, in new

return cls.registries[db_name]

File "/home/odoo/tools/func.py", line 71, in wrapper

return func(self, args, *kwargs)

File "/home/odoo/tools/lru.py", line 34, in getitem

a = self.d[obj]

KeyError: 'V13_DB'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/local/lib/python3.6/dist-packages/openupgradelib/openupgrade.py", line 1859, in wrapped_function

if use_env2 else cr, version)

File "/home/odoo/oca/OpenUpgrade/openupgrade_scripts/scripts/product/14.0.1.2/post-migration.py", line 25, in migrate

date_to_datetime_fields(env)

File "/home/odoo/oca/OpenUpgrade/openupgrade_scripts/scripts/product/14.0.1.2/post-migration.py", line 12, in date_to_datetime_fields

"date_end",

File "/usr/local/lib/python3.6/dist-packages/openupgradelib/openupgrade.py", line 2059, in date_to_datetime_tz

""" % values)

File "/usr/local/lib/python3.6/dist-packages/openupgradelib/openupgrade.py", line 1325, in logged_query

cr.execute(query, args)

File "<decorator-gen-3>", line 2, in execute

File "/home/odoo/sql_db.py", line 101, in check

return f(self, args, *kwargs)

File "/home/odoo/sql_db.py", line 298, in execute

res = self._obj.execute(query, params)

psycopg2.errors.UndefinedColumn: column my_table.user_id does not exist

LINE 7: AND my_table.user_id=ru.id

Hey,

Alright I see, I'm starting to wonder if the open upgrade tool is up to date enough to be able to use it.

I know that they are currently working on the migration of certain modules, all are not yet compatible, the problem surely comes from there.

Best Answer

Hello Jainesh,

OpenUpgrade is not yet ready to make migration from 13.0 to 14.0. Please refer the below link

https://github.com/OCA/OpenUpgrade/issues/2190
https://github.com/OCA/OpenUpgrade/issues/2665

Avatar
Discard
Related Posts Replies Views Activity
1
Nov 24
1484
1
Nov 24
1192
2
Sep 24
1047
1
Aug 24
2454
3
Aug 24
2687