Commit 0c987466 authored by Jérome Perrin's avatar Jérome Perrin

simplify scripts

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39047 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ff65fe8d
...@@ -50,16 +50,10 @@ ...@@ -50,16 +50,10 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""\n <value> <string>return context.getResourceValue().getPrice(\n
Script used to get the exchange ratio used \n context=context.asContext(categories=[context.getResource(base=True),\n
in the conversion of the destination price\n context.getDestinationSectionValue().getPriceCurrency(base=True)],\n
"""\n start_date=context.getStopDate()))\n
\n
currency = context.getResourceValue()\n
exchange_ratio = currency.getPrice(context=context.asContext(categories=[\'resource/%s\' % context.getResource(), \n
\'price_currency/currency_module/%s\' % context.getDestinationSectionValue().getPriceCurrencyId()],\n
start_date=context.getStopDate()))\n
return exchange_ratio\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -98,8 +92,7 @@ return exchange_ratio\n ...@@ -98,8 +92,7 @@ return exchange_ratio\n
<tuple> <tuple>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>currency</string> <string>True</string>
<string>exchange_ratio</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -50,11 +50,10 @@ ...@@ -50,11 +50,10 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>currency = context.getResourceValue()\n <value> <string>return context.getResourceValue().getPrice(\n
exchange_ratio = currency.getPrice(context=context.asContext(categories=[\'resource/%s\' % context.getResource(), \n context=context.asContext(categories=[context.getResource(base=True),\n
\'price_currency/currency_module/%s\' % context.getSourceSectionValue().getPriceCurrencyId()],\n context.getSourceSectionValue().getPriceCurrency(base=True)],\n
start_date=context.getStartDate()))\n start_date=context.getStartDate()))\n
return exchange_ratio\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -93,8 +92,7 @@ return exchange_ratio\n ...@@ -93,8 +92,7 @@ return exchange_ratio\n
<tuple> <tuple>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>currency</string> <string>True</string>
<string>exchange_ratio</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
1368 1369
\ 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