TIP: You can type at any time to perform a new search.
Make database fields from fields that live in serialized fields
unserialize_field · OCA/server-tools
Security findings
Migration considerations
- Imports from the old `openerp.osv` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.tools.translate` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- For a target of Odoo 10.0+: use the `__manifest__.py` manifest name instead of `__openerp__.py`. The filename alone does not establish module age or compatibility. migration-openerp-manifest · source
ir_model_fields— Class 'ir_model_fields' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceview_model_fields_form— For a target of Odoo 17.0+: view 'view_model_fields_form' uses `attrs=`/`states=`, which are no longer supported. Convert modifiers to direct Python boolean expressions in `invisible`/`readonly`/`required`; preserve the original AND/OR logic. migration-view-attrs-states · sourceview_model_form— For a target of Odoo 17.0+: view 'view_model_form' uses `attrs=`/`states=`, which are no longer supported. Convert modifiers to direct Python boolean expressions in `invisible`/`readonly`/`required`; preserve the original AND/OR logic. migration-view-attrs-states · source- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE ir_model_fields SET serialization_field_id = NULL WHERE name = %s and model = %s` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. No target version is selected: apply version-specific advice only when migrating to that version or later.
- Repository
- OCA/server-tools · module folder · Try on Runboat
- Module version
- 1.0
- Category
- Tools
- Folder size
- 0.01 MB
- License
- LGPL-3
- Application
- No
- Auto-installable
- No
- Website
- http://www.therp.nl
- Last tracking update
- 2026-08-07 06:51:52
- Authors
- Odoo Community Association (OCA), Therp BV
- Maintainers
- Odoo Community Association (OCA), Therp BV
- Committers
- Stefan Rijnhart, Alexandre Fayolle, Holger Brunn
- Odoo dependencies
-
odoo/odoo:- base
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
Sparse, or serialized fields do not live as a column in the database table. Instead, their values are stored in JSON arrays in a separate field. As a result, these fields cannot be searched or sorted by. If such a sparse field is created as 'manual', this module can unserialize the field. Its field definition and values will then be migrated to a proper database column. A real life use case where you encounter many of such fields is the Magento-OpenERP connector. For technical reasons, many2many and one2many fields are not supported.
Code Analysis
Views touched (2)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_model_fields_form |
ir.model.fields | form | Inherits base.view_model_fields_form | |
view_model_form |
ir.model | form | Inherits base.view_model_form |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (1)
New fields (0)
No new fields.
Public methods (3)-
action_unserialize_field(self, cr, uid, ids, context=None) -
create_database_column(self, cr, uid, pool_obj, field_name, context=None) -
unserialize_field(self, cr, uid, pool_obj, read_record, serialization_field_name, field_name, context=None)