Commit 5ba7185f authored by Jérome Perrin's avatar Jérome Perrin

make it possible to use currency exchange cell for currency conversion using

currency.getPrice


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38328 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0811bb24
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>currency_exchange_line = context.getParentValue()\n
currency = currency_exchange_line.getParentValue()\n
\n
return context.asContext(_range_criterion=dict(start_date=(currency_exchange_line.getStartDate(),\n
currency_exchange_line.getStopDate())),\n
membership_criterion_base_category=[\'price_currency\', \'resource\', \'currency_exchange_type\'],\n
membership_criterion_category=[\'resource/%s\' % currency.getRelativeUrl(),\n
currency_exchange_line.getPriceCurrency(base=True),\n
context.getCurrencyExchangeType(base=True)])\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>currency_exchange_line</string>
<string>currency</string>
<string>dict</string>
<string>True</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>CurrencyExchangeCell_asPredicate</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -80,9 +77,9 @@ else:\n ...@@ -80,9 +77,9 @@ else:\n
kw[\'sort_method\'] = sort_by_date\n kw[\'sort_method\'] = sort_by_date\n
if validation_state is None:\n if validation_state is None:\n
validation_state=\'validated\'\n validation_state=\'validated\'\n
kw.setdefault(\'portal_type\', \'Currency Exchange Line\')\n
predicate_list = context.portal_domains.searchPredicateList(\n predicate_list = context.portal_domains.searchPredicateList(\n
context=movement,\n context=movement,\n
portal_type=\'Currency Exchange Line\',\n
validation_state=validation_state,\n validation_state=validation_state,\n
test=1,\n test=1,\n
**kw)\n **kw)\n
......
834 835
\ 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