Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: Migrations scripts from MuK DMS to OCA DMS
byThank you very much everybody for the information and the great work on openupgrade.
I wasn’t aware that everything is already integrated into the existing scripts.
However, when I run the migration in 13.0, it fails in the postmigration step for the
dms. Im am using the latest versions of the openupgradelib and the 13.0 branch from
openupgrade itself.
2025-03-24 16:20:03,420 2372 INFO elego_v13 odoo.modules.migration: module dms: Running migration [13.0.8.1.0>] post-migration
2025-03-24 16:20:03,422 2372 INFO elego_v13 OpenUpgrade: dms: post-migration script called with version 12.0.2.0.1
2025-03-24 16:20:03,579 2372 ERROR elego_v13 OpenUpgrade: dms: error in migration script /opt/odoo/lib/addons/oca-mirror-dms/dms/migrations/13.0.8.1.0/post-migration.py: ('dms.file(3249,).content', None)
2025-03-24 16:20:03,579 2372 ERROR elego_v13 OpenUpgrade: ('dms.file(3249,).content', None)
Traceback (most recent call last):
File "/opt/odoo/lib/odoo/odoo/api.py", line 748, in get
value = self._data[field][record._ids[0]]
KeyError: 3249
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/lib/odoo/odoo/fields.py", line 1038, in __get__
value = env.cache.get(record, self)
File "/opt/odoo/lib/odoo/odoo/api.py", line 754, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('dms.file(3249,).content', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/lib/odoo/odoo/api.py", line 748, in get
value = self._data[field][record._ids[0]]
KeyError: 3249
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/openupgradelib/openupgrade.py", line 2331, in wrapped_function
version,
File "/opt/odoo/lib/addons/oca-mirror-dms/dms/migrations/13.0.8.1.0/post-migration.py", line 9, in migrate
env["dms.file"].search([])._compute_mimetype()
File "/opt/odoo/lib/addons/oca-mirror-dms/dms/models/dms_file.py", line 379, in _compute_mimetype
record.res_mimetype = guess_mimetype(base64.b64decode(record.content or ""))
File "/opt/odoo/lib/odoo/odoo/fields.py", line 1065, in __get__
value = env.cache.get(record, self)
File "/opt/odoo/lib/odoo/odoo/api.py", line 754, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('dms.file(3249,).content', None)
2025-03-24 16:20:03,584 2372 ERROR elego_v13 odoo.modules.loading: Error executing post migration script for module dms
: ('dms.file(3249,).content', None)
2025-03-24 16:20:03,596 2372 ERROR elego_v13 odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/opt/odoo/lib/odoo/odoo/api.py", line 748, in get
value = self._data[field][record._ids[0]]
KeyError: 3249
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/lib/odoo/odoo/fields.py", line 1038, in __get__
value = env.cache.get(record, self)
File "/opt/odoo/lib/odoo/odoo/api.py", line 754, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('dms.file(3249,).content', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/lib/odoo/odoo/api.py", line 748, in get
value = self._data[field][record._ids[0]]
KeyError: 3249
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/lib/odoo/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/lib/odoo/odoo/modules/loading.py", line 489, in load_modules
force, status, report, loaded_modules, update_module, models_to_check, upg_registry)
File "/opt/odoo/lib/odoo/odoo/modules/loading.py", line 368, in load_marked_modules
upg_registry=upg_registry,
File "/opt/odoo/lib/odoo/odoo/modules/loading.py", line 256, in load_module_graph
migrations.migrate_module(package, 'post')
File "/opt/odoo/lib/odoo/odoo/modules/migration.py", line 191, in migrate_module
migrate(self.cr, installed_version)
File "/usr/local/lib/python3.7/dist-packages/openupgradelib/openupgrade.py", line 2331, in wrapped_function
version,
File "/opt/odoo/lib/addons/oca-mirror-dms/dms/migrations/13.0.8.1.0/post-migration.py", line 9, in migrate
env["dms.file"].search([])._compute_mimetype()
File "/opt/odoo/lib/addons/oca-mirror-dms/dms/models/dms_file.py", line 379, in _compute_mimetype
record.res_mimetype = guess_mimetype(base64.b64decode(record.content or ""))
File "/opt/odoo/lib/odoo/odoo/fields.py", line 1065, in __get__
value = env.cache.get(record, self)
File "/opt/odoo/lib/odoo/odoo/api.py", line 754, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('dms.file(3249,).content', None)
2025-03-24 16:20:03,597 2372 CRITICAL elego_v13 odoo.service.server: Failed to initialize database `elego_v13`.
Traceback (most recent call last):
File "/opt/odoo/lib/odoo/odoo/api.py", line 748, in get
value = self._data[field][record._ids[0]]
KeyError: 3249
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/lib/odoo/odoo/fields.py", line 1038, in __get__
value = env.cache.get(record, self)
File "/opt/odoo/lib/odoo/odoo/api.py", line 754, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('dms.file(3249,).content', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/lib/odoo/odoo/api.py", line 748, in get
value = self._data[field][record._ids[0]]
KeyError: 3249
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/lib/odoo/odoo/service/server.py", line 1194, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/opt/odoo/lib/odoo/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/lib/odoo/odoo/modules/loading.py", line 489, in load_modules
force, status, report, loaded_modules, update_module, models_to_check, upg_registry)
File "/opt/odoo/lib/odoo/odoo/modules/loading.py", line 368, in load_marked_modules
upg_registry=upg_registry,
File "/opt/odoo/lib/odoo/odoo/modules/loading.py", line 256, in load_module_graph
migrations.migrate_module(package, 'post')
File "/opt/odoo/lib/odoo/odoo/modules/migration.py", line 191, in migrate_module
migrate(self.cr, installed_version)
File "/usr/local/lib/python3.7/dist-packages/openupgradelib/openupgrade.py", line 2331, in wrapped_function
version,
File "/opt/odoo/lib/addons/oca-mirror-dms/dms/migrations/13.0.8.1.0/post-migration.py", line 9, in migrate
env["dms.file"].search([])._compute_mimetype()
File "/opt/odoo/lib/addons/oca-mirror-dms/dms/models/dms_file.py", line 379, in _compute_mimetype
record.res_mimetype = guess_mimetype(base64.b64decode(record.content or ""))
File "/opt/odoo/lib/odoo/odoo/fields.py", line 1065, in __get__
value = env.cache.get(record, self)
File "/opt/odoo/lib/odoo/odoo/api.py", line 754, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('dms.file(3249,).content', None)
2025-03-24 16:20:03,599 2372 INFO elego_v13 odoo.service.server: Stopping gracefully
openupgrade failed
This may be a subsequent error, as I see some of these error logs before:
2025-03-24 16:20:03,383 2372 ERROR elego_v13 OpenUpgrade: Pass argument 'env_or_cr' as Cursor parameter until 16.0
I haven’t been able to isolate the problem further yet.
The actual data — dms.file(3249) — is there and should be correct (at least in the MuK tables); content is
one of the columns that are new or migrated.
Looking forward for any hints how best to proceed again.
Olaf
On 24 Mar 2025, at 13:33, Enric Tobella Alomar wrote:
When we ported the module, we made it compatible with MUK DMS. You should need to use OpenUpgrade on the migration and set the rename of the module on the apriori file.Kind regards,El lun, 24 mar 2025 a las 13:17, Radovan Skolnik (<notifications@odoo-community.org>) escribió:Hi,
I believe it is already part of the migration scripts. Check https://github.com/OCA/dms/tree/13.0/dms/migrations/13.0.1 and/or https://github.com/tegin/dms/commits/13.0-dms-migration/
Best regards
Radovan Skolnik
On pondelok 24. marca 2025 12:07:13 CET Olaf Wagner wrote:
> Hello everybody,
> we need to migrate some customers from the original MuK DMS modules to
> the OCA modules. I seem to remember having seen something about ready
> migration scripts several years ago when the DMS modules were first imported
> into the OCA repository, but am not able to find that again.
> Can anybody help?
> Thanks in advance for any hint,
> Olaf
> --
> Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com
> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
> Geschäftsführer: Olaf Wagner | Sitz: Berlin
> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
>
> _______________________________________________
> Mailing-List: https://odoo-community.org/groups/contributors-15 [1]
> Post to: mailto:contributors@odoo-community.org
> Unsubscribe: https://odoo-community.org/groups?unsubscribe [2]
>
>
>
> [1] https://odoo-community.org/groups/contributors-15
> [2] https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
--Enric Tobella AlomarCEO & Founder_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
--
Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
Reference
-
Migrations scripts from MuK DMS to OCA DMS
byelego Software Solutions GmbH, Olaf Wagner-
Re: Migrations scripts from MuK DMS to OCA DMS
byelego Software Solutions GmbH, Olaf Wagner -
Re: Migrations scripts from MuK DMS to OCA DMS
byTecnativa. S. L., Pedro M. Baeza -
Re: Migrations scripts from MuK DMS to OCA DMS
byelego Software Solutions GmbH, Olaf Wagner -
Re: Migrations scripts from MuK DMS to OCA DMS
byDIXMIT Consulting SLU, Enric Tobella Alomar -
Re: Migrations scripts from MuK DMS to OCA DMS
byTecnativa. S. L., Pedro M. Baeza -
Re: Migrations scripts from MuK DMS to OCA DMS
byData Dance s.r.o., Radovan Skolnik
-