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