Commit 1ebefce8 authored by Aurel's avatar Aurel Committed by Jérome Perrin

prevent multiple conversion with renderSimpleView too + minors fixes

parent 0ed3e9b4
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
portal = context.getPortalObject() portal = context.getPortalObject()
request = portal.REQUEST request = portal.REQUEST
report_format = request_form['format']
if portal.portal_preferences.getPreferredDeferredReportStoredAsDocument():
request_form['format'] = None
request.form.update(request_form) request.form.update(request_form)
if skin_name and skin_name != 'None': # make_query serializes None as 'None' if skin_name and skin_name != 'None': # make_query serializes None as 'None'
...@@ -31,4 +35,5 @@ with portal.Localizer.translationContext(localizer_language): ...@@ -31,4 +35,5 @@ with portal.Localizer.translationContext(localizer_language):
user_name=user_name, user_name=user_name,
subject=str(translateString(attachment_name.rsplit('.', 1)[0])), subject=str(translateString(attachment_name.rsplit('.', 1)[0])),
message='', message='',
attachment_list=attachment_list) attachment_list=attachment_list,
format=report_format)
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>user_name, subject, message, attachment_list, format=None</string> </value> <value> <string>user_name, subject, message, attachment_list, format=""</string> </value>
</item> </item>
<item> <item>
<key> <string>_proxy_roles</string> </key> <key> <string>_proxy_roles</string> </key>
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Deferred Style Preferences</string> </value> <value> <string>Deferred Style</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode_mode</string> </key> <key> <string>unicode_mode</string> </key>
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Deferred Report Stored As Document</string> </value> <value> <string>Deferred Report Stored as Document</string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
......
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