Browse Source

[FIX] Always give the cursor back its commit method

pull/78/head
Stefan Rijnhart 12 years ago
parent
commit
206e09ca0e
  1. 4
      unserialize_field/ir_model_fields.py

4
unserialize_field/ir_model_fields.py

@ -35,6 +35,7 @@ class ir_model_fields(orm.Model):
commit_org = cr.commit commit_org = cr.commit
cr.commit = lambda *args: None cr.commit = lambda *args: None
try:
for this in self.browse(cr, uid, ids, context=context): for this in self.browse(cr, uid, ids, context=context):
pool_obj = self.pool.get(this.model_id.model) pool_obj = self.pool.get(this.model_id.model)
self.create_database_column(cr, uid, pool_obj, this.name, self.create_database_column(cr, uid, pool_obj, this.name,
@ -53,8 +54,9 @@ class ir_model_fields(orm.Model):
this.serialization_field_id.name, this.serialization_field_id.name,
this.name, context=context) this.name, context=context)
offset += 1 offset += 1
finally:
cr.commit = commit_org cr.commit = commit_org
return True return True
def create_database_column(self, cr, uid, pool_obj, field_name, def create_database_column(self, cr, uid, pool_obj, field_name,

Loading…
Cancel
Save