[MERGE] Merged data loader fixes.

bzr revid: jth@openerp.com-20100608123459-3pat73cpmyzjwu20
This commit is contained in:
Julien Thewys
2010-06-08 14:34:59 +02:00
parent d24ad7a89c
commit f070facbd1
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -664,6 +664,9 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs):
# TODO manage .csv file with noupdate == (kind == 'init')
if ext == '.sql':
process_sql_file(cr, fp)
elif ext == '.csv':
noupdate = (kind == 'init')
tools.convert_csv_import(cr, module_name, file, id_map, mode, noupdate)
elif ext == '.yml':
tools.convert_yaml_import(cr, module_name, file, id_map, mode, noupdate)
else:
+1 -1
View File
@@ -335,7 +335,7 @@ class YamlInterpreter(object):
else:
raise KeyError("Object '%s' does not contain field '%s'" % (model, field_name))
if is_ref(expression):
elements = self.process_ref(expression)
elements = self.process_ref(expression, column)
if column._type in ("many2many", "one2many"):
value = [(6, 0, elements)]
else: # many2one