Commit 2a87e301 authored by Mame Coumba Sall's avatar Mame Coumba Sall

2008-09-09

* add script that calculate the base price of the currency exchange line of a currency

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23513 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 254f88be
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
<list> <list>
<string>my_start_date</string> <string>my_start_date</string>
<string>my_stop_date</string> <string>my_stop_date</string>
<string>my_translated_validation_state_title</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -98,7 +99,6 @@ ...@@ -98,7 +99,6 @@
<value> <value>
<list> <list>
<string>listbox_base_price</string> <string>listbox_base_price</string>
<string>listbox_discount</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -117,7 +117,6 @@ ...@@ -117,7 +117,6 @@
<list> <list>
<string>my_source_title</string> <string>my_source_title</string>
<string>my_base_price</string> <string>my_base_price</string>
<string>my_translated_validation_state_title</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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>"Search for all predicates that corresponds to this particular context"\n
predicate_list = context.portal_domains.searchPredicateList(\n
context=movement,portal_type=\'Currency Exchange Line\')\n
\n
"""\n
For each predicate(i.e: Currency Exchange Line) found, get the exchange rate\n
with the reference currency\n
"""\n
for predicate in predicate_list:\n
return predicate.Resource_getPriceCalculationOperandDict(movement=predicate,**kw)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>default=None, movement, REQUEST=None, **kw</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>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>default</string>
<string>movement</string>
<string>REQUEST</string>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>predicate_list</string>
<string>_getiter_</string>
<string>predicate</string>
<string>_apply_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
<none/>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Currency_getPriceCalculationOperandDict</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
418 419
\ 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