From 98bd60f2fa0b9453bad72b02ccee4e7bfab60fdb Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Thu, 25 Apr 2013 15:32:28 +0200 Subject: [PATCH] [FIX] pass context to write function --- unserialize_field/ir_model_fields.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/unserialize_field/ir_model_fields.py b/unserialize_field/ir_model_fields.py index 10986035f..78244bd1d 100644 --- a/unserialize_field/ir_model_fields.py +++ b/unserialize_field/ir_model_fields.py @@ -46,7 +46,7 @@ class ir_model_fields(Model): context=context): self.unserialize_field(cr, uid, pool_obj, data, this.serialization_field_id.name, - this.name) + this.name, context=context) offset += 1 return True @@ -91,7 +91,8 @@ class ir_model_fields(Model): pool_obj._auto_init(cr, {}) def unserialize_field(self, cr, uid, pool_obj, read_record, - serialization_field_name, field_name): + serialization_field_name, field_name, + context=None): if not field_name in read_record[serialization_field_name]: return False pool_obj.write( @@ -99,4 +100,5 @@ class ir_model_fields(Model): { field_name: read_record[serialization_field_name][field_name], - }) + }, + context=context)