Revert "[FIX] manual creation of serialized field from the interface"

Non applicable since b0646f9d2c.

This reverts commit 03395ea103.
This commit is contained in:
Christophe Simonis
2018-08-21 14:13:15 +02:00
parent e80f853ab3
commit c619b19f66
2 changed files with 0 additions and 8 deletions
-2
View File
@@ -850,8 +850,6 @@ class IrModelFields(models.Model):
# add compute function if given
if field_data['compute']:
attrs['compute'] = make_compute(field_data['compute'], field_data['depends'])
if field_data.get('sparse'):
attrs['sparse'] = field_data['sparse']
return attrs
def _instanciate(self, field_data, partial):
-6
View File
@@ -215,15 +215,9 @@ class Registry(Mapping):
if self._fields_by_model is None:
# Query manual fields for all models at once
self._fields_by_model = dic = defaultdict(dict)
id2name = {}
cr.execute('SELECT * FROM ir_model_fields WHERE state=%s', ('manual',))
for field in cr.dictfetchall():
dic[field['model']][field['name']] = field
id2name[field['id']] = field['name']
# compute the attribute 'sparse'
for fields in dic.values():
for name, field in fields.items():
field['sparse'] = id2name.get(field['serialization_field_id'])
return self._fields_by_model[model_name]
def do_parent_store(self, cr):