[MERGE] orm: at csv import, properly report lines with less columns.
bzr revid: vmt@openerp.com-20110523143929-1k23u8oqzvmirqw1
This commit is contained in:
+4
-2
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user