Commit 1919f765 authored by Jean-Paul Smets's avatar Jean-Paul Smets

now returns the correct number of imported organisations (variable compteur)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@136 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 66c75911
......@@ -15,6 +15,7 @@
request = context.REQUEST
file_line_list = import_file.readlines()
organisation_module = context.getPortalObject().organisation
compteur = 0
for file_line in file_line_list :
sub_line_list = file_line.split('\r')
......@@ -158,12 +159,13 @@ for file_line in file_line_list :
ean13_code = my_ean_code,
eu_vat_code = my_tva_code,
code_comptable = my_compta_code)
compteur += 1
organisation_module[my_id].flushActivity(invoke=1)
# return printed
redirect_url = '%s?%s' % ( organisation_module.absolute_url()
, 'portal_status_message=%s+organisations+cres.' % len(sub_line_list)
, 'portal_status_message=%s+organisations+cres.' % compteur
)
request[ 'RESPONSE' ].redirect( redirect_url )
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