Don't load empty line in csv
bzr revid: ced-416800860388b77d6418cee57c1e906d6dc012f3
This commit is contained in:
parent
8e80152d90
commit
984d036986
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue