From fc8498ea9cfbde1ce1cef95078189f9df73a996a Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Wed, 12 Oct 2011 12:01:45 +0530 Subject: [PATCH] [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 --- openerp/tools/yaml_import.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openerp/tools/yaml_import.py b/openerp/tools/yaml_import.py index 91cdda1b896..a8e22badcc7 100644 --- a/openerp/tools/yaml_import.py +++ b/openerp/tools/yaml_import.py @@ -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