[FIX] tools/yml_import: pass context into update data in record parsing

bzr revid: hmo@tinyerp.com-20100901085707-lxeo23h9ziwilpkx
This commit is contained in:
Harry (OpenERP)
2010-09-01 14:27:07 +05:30
parent 73ac56eaf1
commit 73bbce205b
+3 -1
View File
@@ -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()