Don't load empty line in csv

bzr revid: ced-416800860388b77d6418cee57c1e906d6dc012f3
This commit is contained in:
ced 2007-10-17 13:48:35 +00:00
parent 8e80152d90
commit 984d036986
1 changed files with 2 additions and 0 deletions

View File

@ -648,6 +648,8 @@ def convert_csv_import(cr, module, fname, csvcontent, idref=None, mode='init',
uid = 1
datas = []
for line in reader:
if not line.strip():
continue
datas.append( map(lambda x:x.decode('utf8').encode('utf8'), line))
pool.get(model).import_data(cr, uid, fields, datas,mode, module,noupdate)