[FIX] remove useless cr.commit in fields creation

This is require to be able to create revertable tests adding new fields

bzr revid: mat@openerp.com-20140213120349-a0p3bist5l5uyg6b
This commit is contained in:
Martin Trigaux 2014-02-13 13:03:49 +01:00
parent e2d3fa0a40
commit ff389d8478
1 changed files with 0 additions and 4 deletions

View File

@ -765,8 +765,6 @@ class BaseModel(object):
(name_id, context['module'], 'ir.model', model_id)
)
cr.commit()
cr.execute("SELECT * FROM ir_model_fields WHERE model=%s", (self._name,))
cols = {}
for rec in cr.dictfetchall():
@ -834,7 +832,6 @@ class BaseModel(object):
for key, val in vals.items():
if cols[k][key] != vals[key]:
cr.execute('update ir_model_fields set field_description=%s where model=%s and name=%s', (vals['field_description'], vals['model'], vals['name']))
cr.commit()
cr.execute("""UPDATE ir_model_fields SET
model_id=%s, field_description=%s, ttype=%s, relation=%s,
view_load=%s, select_level=%s, readonly=%s ,required=%s, selectable=%s, relation_field=%s, translate=%s, serialization_field_id=%s
@ -845,7 +842,6 @@ class BaseModel(object):
vals['select_level'], bool(vals['readonly']), bool(vals['required']), bool(vals['selectable']), vals['relation_field'], bool(vals['translate']), vals['serialization_field_id'], vals['model'], vals['name']
))
break
cr.commit()
#
# Goal: try to apply inheritance at the instanciation level and