[MERGE] orm: at csv import, properly report lines with less columns.

bzr revid: vmt@openerp.com-20110523143929-1k23u8oqzvmirqw1
This commit is contained in:
Vo Minh Thu
2011-05-23 16:39:29 +02:00
+4 -2
View File
@@ -762,10 +762,12 @@ class orm_template(object):
done = {}
for i in range(len(fields)):
res = False
if i >= len(line):
raise Exception(_('Please check that all your lines have %d columns.'
'Stopped around line %d having %d columns.') % \
(len(fields), position+2, len(line)))
if not line[i]:
continue
if i >= len(line):
raise Exception(_('Please check that all your lines have %d columns.') % (len(fields),))
field = fields[i]
if field[:len(prefix)] <> prefix: