This removal has led to a necessary refactoring: - make the setup of field attributes extensible; - make the instantiation of custom fields extensible; - delegate model and field reflection to `ir.model` and `ir.model.fields`; - move the implementation of sparse and serialized fields to module `base_sparse_field`;
13 lines
378 B
Python
13 lines
378 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from . import models
|
|
from . import tests
|
|
|
|
def _update_database_schema(cr):
|
|
# The reflection of fields is done before updating the model's schema,
|
|
# therefore we first update the schema.
|
|
cr.execute("""
|
|
ALTER TABLE ir_model_fields
|
|
ADD COLUMN serialization_field_id integer REFERENCES ir_model_fields ON DELETE cascade
|
|
""")
|