Commit 03cbe3f6 authored by Aurel's avatar Aurel

coding style, use better accessor, add an int index on line for better display

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45409 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1e0aec6b
No related merge requests found
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
......@@ -58,14 +55,15 @@
base_id = \'path\'\n
kwd = {\'base_id\': base_id}\n
\n
\n
context.updateCellRange(script_id=\'CurrencyExchangeLine_asCellRange\', base_id=base_id)\n
cell_range_key_list = context.getCellRangeKeyList(base_id = base_id)\n
resource_list = [\'resource/%s\' % context.getParentValue().getRelativeUrl()]\n
price_currency_list = [\'price_currency/%s\' % context.getPriceCurrency()]\n
membership_list = resource_list+price_currency_list\n
price_currency_list = [context.getPriceCurrency(base=True)]\n
membership_list = resource_list + price_currency_list\n
context.setMembershipCriterionBaseCategoryList([x.split(\'/\')[0] for x in membership_list])\n
context.setMembershipCriterionCategoryList(membership_list)\n
context.setResource(context.getParentValue().getRelativeUrl())\n
context.setResourceValue(context.getParentValue())\n
context.setMappedValuePropertyList((\'base_price\',\'discount\'))\n
if cell_range_key_list != [[None, None]] :\n
i = 0\n
......@@ -81,88 +79,20 @@ if cell_range_key_list != [[None, None]] :\n
c.setCriterion(\'stop_date\', min=context.getStartDate(), max=context.getStopDate())\n
if c.getBasePrice() is None and context.getBasePrice() is not None:\n
c.setBasePrice(context.getBasePrice())\n
# set an int index for display\n
currency_exchange_type_value_list = c.getValueList(\'currency_exchange_type\')\n
if currency_exchange_type_value_list:\n
c.setIntIndex(currency_exchange_type_value_list[0].getIntIndex())\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change, **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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>state_change</string>
<string>kw</string>
<string>_getitem_</string>
<string>context</string>
<string>base_id</string>
<string>kwd</string>
<string>_getattr_</string>
<string>cell_range_key_list</string>
<string>resource_list</string>
<string>price_currency_list</string>
<string>membership_list</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>x</string>
<string>None</string>
<string>i</string>
<string>k</string>
<string>filter</string>
<string>category_list</string>
<string>_apply_</string>
<string>c</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>CurrencyExchangeLine_updateMatrix</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
......
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