[Erp5-report] r45409 aurel - /erp5/trunk/bt5/erp5_banking_core/WorkflowTemplateItem/portal_...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Apr 14 11:01:40 CEST 2011


Author: aurel
Date: Thu Apr 14 11:01:39 2011
New Revision: 45409

URL: http://svn.erp5.org?rev=45409&view=rev
Log:
coding style, use better accessor, add an int index on line for better display

Modified:
    erp5/trunk/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/currency_exchange_line_interaction_workflow/scripts/CurrencyExchangeLine_updateMatrix.xml

Modified: erp5/trunk/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/currency_exchange_line_interaction_workflow/scripts/CurrencyExchangeLine_updateMatrix.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/currency_exchange_line_interaction_workflow/scripts/CurrencyExchangeLine_updateMatrix.xml?rev=45409&r1=45408&r2=45409&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/currency_exchange_line_interaction_workflow/scripts/CurrencyExchangeLine_updateMatrix.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/currency_exchange_line_interaction_workflow/scripts/CurrencyExchangeLine_updateMatrix.xml [utf8] Thu Apr 14 11:01:39 2011
@@ -2,10 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <tuple>
-        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
-        <tuple/>
-      </tuple>
+      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
     </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]]
     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>



More information about the Erp5-report mailing list