From 8b21a392ded49c241ed05f929f88c3d85a6240f0 Mon Sep 17 00:00:00 2001 From: bch <> Date: Thu, 5 Apr 2007 14:02:28 +0000 Subject: [PATCH] Csv import : bugfix of convert_csv_import(): one line was ignored every commit bzr revid: bch-2c45d9af534656d68b690e7185f4bcd981268928 --- bin/tools/convert.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/tools/convert.py b/bin/tools/convert.py index 2d7e4a2a284..08ddad2ea47 100644 --- a/bin/tools/convert.py +++ b/bin/tools/convert.py @@ -395,15 +395,15 @@ def convert_csv_import(cr, module, fname, csvcontent, idref={}, mode='init'): uid = 1 datas = [] - for line in data: + for line in reader: datas.append( map(lambda x:x.decode('utf8').encode('utf8'), line)) if len(datas) > COMMIT_STEP: - pool.get(model).import_data(cr, uid, data[0], datas[1:]) + pool.get(model).import_data(cr, uid, fields, datas) cr.commit() datas=[] if datas: - pool.get(model).import_data(cr, uid, data[0], datas[1:]) + pool.get(model).import_data(cr, uid, fields, datas) cr.commit() #