Commit daebbadf authored by Vincent Pelletier's avatar Vincent Pelletier

Display all errors at once when importing a list checkbooks, to relieve the...

Display all errors at once when importing a list checkbooks, to relieve the user from the hassle to reimport after fixing each error.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18499 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7173fd7d
......@@ -68,6 +68,7 @@ def CheckbookReception_importItemFile(self, import_file=None, REQUEST=None, **kw
if is_checkbook:
listbox_line['check_amount'] = resource_amount_dict[item_dict['check_quantity']]
listbox.append(listbox_line)
i += 1
listbox_dict[resource_relative_url] = listbox
# First make sure there is no errors
message = None
......@@ -81,7 +82,7 @@ def CheckbookReception_importItemFile(self, import_file=None, REQUEST=None, **kw
resource=resource_relative_url,
REQUEST=REQUEST)
if error_value:
message = field_error_dict.values()[0].error_text
message = ', '.join([str(x.error_text) for x in field_error_dict.itervalues()])
redirect_url = '%s/view?%s' % ( self.absolute_url()
, 'portal_status_message=%s' % message)
REQUEST['RESPONSE'].redirect( redirect_url )
......
355
\ No newline at end of file
357
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment