[FIX]: Fixed problem of context not passed properly in creating record by !record tag of yml with context.

bzr revid: rpa@tinyerp.com-20111012063145-6feojywf8a7jo91m
This commit is contained in:
Rucha (Open ERP) 2011-10-12 12:01:45 +05:30
parent 76c702ca3c
commit fc8498ea9c
1 changed files with 2 additions and 1 deletions

View File

@ -298,8 +298,9 @@ class YamlInterpreter(object):
def create_osv_memory_record(self, record, fields):
model = self.get_model(record.model)
context = self.get_context(record, self.eval_context)
record_dict = self._create_record(model, fields)
id_new=model.create(self.cr, self.uid, record_dict, context=self.context)
id_new = model.create(self.cr, self.uid, record_dict, context=context)
self.id_map[record.id] = int(id_new)
return record_dict