Commit 1ef271c6 authored by Rafael Monnerat's avatar Rafael Monnerat

Fewl code style improvements.

parent 56592590
...@@ -56,15 +56,16 @@ if empty_first_element==True:\n ...@@ -56,15 +56,16 @@ if empty_first_element==True:\n
result = [[\'\', \'\'],]\n result = [[\'\', \'\'],]\n
\n \n
filename = "standard_currency_list.ods"\n filename = "standard_currency_list.ods"\n
cachedMethod = CachingMethod(context.ConfigurationTemplate_readOOCalcFile, \n rows = CachingMethod(context.ConfigurationTemplate_readOOCalcFile, \n
script.getId(),\n script.getId(),\n
cache_factory="erp5_content_long")\n cache_factory="erp5_content_long")(filename)\n
rows= cachedMethod(filename)\n
\n \n
Base_translateString = context.Base_translateString\n Base_translateString = context.Base_translateString\n
for row in rows:\n for row in rows:\n
currency_title = Base_translateString(row[\'currency\'])\n currency_title = Base_translateString(row[\'currency\'])\n
line = [currency_title, \'%s;%s;%s\' %(row[\'iso_code\'].strip(), row[\'precision\'].strip(), row[\'currency\'].strip())]\n line = [currency_title, \'%s;%s;%s\' % (row[\'iso_code\'].strip(),\n
row[\'precision\'].strip(),\n
row[\'currency\'].strip())]\n
result.append(line)\n result.append(line)\n
return result\n return result\n
</string> </value> </string> </value>
......
...@@ -51,11 +51,13 @@ ...@@ -51,11 +51,13 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Cache import CachingMethod\n <value> <string>from Products.ERP5Type.Cache import CachingMethod\n
\n
filename = business_configuration.getUserInterfaceDescriptionFileId()\n filename = business_configuration.getUserInterfaceDescriptionFileId()\n
cachedMethod = CachingMethod(context.ConfigurationTemplate_readOOCalcFile, \'%s_%s\' %(script.getId(),filename))\n \n
object_list = cachedMethod(filename)\n return CachingMethod(\n
return object_list\n context.ConfigurationTemplate_readOOCalcFile, \n
\'%s_%s\' % (script.getId(), filename), \n
cache_factory="erp5_content_long"\n
)(filename)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
524 525
\ No newline at end of file \ 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