From 73bbce205b018e5d0b6c3a2db5fb56c0e59718b4 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Wed, 1 Sep 2010 14:27:07 +0530 Subject: [PATCH] [FIX] tools/yml_import: pass context into update data in record parsing bzr revid: hmo@tinyerp.com-20100901085707-lxeo23h9ziwilpkx --- bin/tools/yaml_import.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/tools/yaml_import.py b/bin/tools/yaml_import.py index 45815bf5795..4d825d7da95 100644 --- a/bin/tools/yaml_import.py +++ b/bin/tools/yaml_import.py @@ -293,8 +293,10 @@ class YamlInterpreter(object): record_dict = self._create_record(model, fields) self.logger.debug("RECORD_DICT %s" % record_dict) + #context = self.get_context(record, self.eval_context) + context = record.context #TOFIX: record.context like {'withoutemployee':True} should pass from self.eval_context. example: test_project.yml in project module id = self.pool.get('ir.model.data')._update(self.cr, self.uid, record.model, \ - self.module, record_dict, record.id, noupdate=self.isnoupdate(record), mode=self.mode) + self.module, record_dict, record.id, noupdate=self.isnoupdate(record), mode=self.mode, context=context) self.id_map[record.id] = int(id) if config.get('import_partial'): self.cr.commit()