You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i got this error: psycopg2.ProgrammingError: can't adapt type 'res.company' during the OpenUpgrade process [11→12].
(i am new to openupgrade)
Module
stock
Describe the bug
2024-04-30 07:51:29,525 4446 ERROR odoo12-from11 odoo.sql_db: bad query: UPDATE "stock_rule" SET "company_id"=%s,"write_uid"=%s,"write_date"=%s WHERE id IN %s
ERROR: can't adapt type 'res.company'
2024-04-30 07:51:29,526 4446 ERROR odoo12-from11 OpenUpgrade: stock: error in migration script stock/migrations/12.0.1.1/post-migration.py: can't adapt type 'res.company'
2024-04-30 07:51:29,526 4446 ERROR odoo12-from11 OpenUpgrade: can't adapt type 'res.company'
Traceback (most recent call last):
File "/home/odoo/venv-3.6-odoo12/lib64/python3.6/site-packages/openupgradelib/openupgrade.py", line 2285, in wrapped_function
version,
File "/home/odoo/odoo11to12/OpenUpgrade-12/addons/stock/migrations/12.0.1.1/post-migration.py", line 181, in migrate
merge_stock_location_path_stock_rule(env)
File "/home/odoo/odoo11to12/OpenUpgrade-12/addons/stock/migrations/12.0.1.1/post-migration.py", line 98, in merge_stock_location_path_stock_rule
row[0],
File "/home/odoo/venv-3.6-odoo12/lib64/python3.6/site-packages/openupgradelib/openupgrade_merge_records.py", line 1036, in merge_records
_adjust_merged_values_orm(*args2)
File "/home/odoo/venv-3.6-odoo12/lib64/python3.6/site-packages/openupgradelib/openupgrade_merge_records.py", line 631, in _adjust_merged_values_orm
target_record.write(new_vals)
2024-04-30 07:51:29,531 4446 ERROR odoo12-from11 odoo.modules.loading: Error executing post migration script for module stock
`-> product_expiry
`-> stock_picking_batch
: can't adapt type 'res.company'
obviously the error happens in OpenUpgrade-12/addons/stock/migrations/12.0.1.1/post-migration.py:merge_stock_location_path_stock_rule(), but i can't make out where exactly; nor i know, if this is caused by sthg that may have modified res.company in the first place or due to something wrong in my odoo-11 stock or due to an error / missing feature in OpenUpgrade-11 ("stock" is marked as "complete" …).
Can't adapt type is a common error. All it means is for example user.company_id is being passed instead of user.company_id.id - it should be trivial to find and fix. If it isn't in the upgrade scripts then it will be a module setting defaults incorrectly or similar.
i got this error:
psycopg2.ProgrammingError: can't adapt type 'res.company'
during the OpenUpgrade process [11→12].(i am new to openupgrade)
Module
stock
Describe the bug
obviously the error happens in
OpenUpgrade-12/addons/stock/migrations/12.0.1.1/post-migration.py:merge_stock_location_path_stock_rule()
, but i can't make out where exactly; nor i know, if this is caused by sthg that may have modified res.company in the first place or due to something wrong in my odoo-11 stock or due to an error / missing feature in OpenUpgrade-11 ("stock" is marked as "complete" …).To Reproduce
Affected versions:
Steps to reproduce the behavior:
createdb odoo12-from11
psql -d odoo12-from11 -f dump.sql >/dev/null
./odoo11to12/OpenUpgrade-12/odoo-bin -d odoo12-from11 --without-demo=all --addons-path=odoo11to12/OpenUpgrade-12/addons,odoo11to12/commercialAddons,odoo11to12/OCA-12 -D . --update=all --stop-after-init >OpenUpgrade.log 2>&1
Expected behavior
update the database from 11 to 12 without error.
Additional context
in case the full log is required, just let me know.
The text was updated successfully, but these errors were encountered: