[Erp5-report] r32936 kazuhiko - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Feb 22 12:37:28 CET 2010


Author: kazuhiko
Date: Mon Feb 22 12:37:27 2010
New Revision: 32936

URL: http://svn.erp5.org?rev=32936&view=rev
Log:
add a cell range script for Payment Simulation Rule.

Added:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentSimulationRule_asCellRange.xml
Modified:
    erp5/trunk/bt5/erp5_accounting/bt/revision

Added: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentSimulationRule_asCellRange.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentSimulationRule_asCellRange.xml?rev=32936&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentSimulationRule_asCellRange.xml (added)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentSimulationRule_asCellRange.xml [utf8] Mon Feb 22 12:37:27 2010
@@ -1,0 +1,174 @@
+<?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>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>dimension_list = [\'contribution_share\', \'product\', \'region\', \'product_line\',\n
+                  \'destination_region\', \'has_vat_number\', \'movement\']\n
+\n
+for pred in context.objectValues(portal_type=\'Predicate\'):\n
+  if pred.getStringIndex() not in dimension_list:\n
+    dimension_list.append(pred.getStringIndex())\n
+\n
+if list_dimensions:\n
+  return dimension_list\n
+\n
+dimension_result_list = []\n
+\n
+for dimension in dimension_list:\n
+  if dimension is not None:\n
+    predicate_list = [x for x in context.contentValues(portal_type=\'Predicate\')\n
+                       if x.getStringIndex() == dimension ]\n
+    predicate_list.sort(key=lambda x: x.getProperty(\'int_index\', 1))\n
+    if len(predicate_list):\n
+      dimension_result_list.append(predicate_list)\n
+\n
+dimension_ids_list = []\n
+\n
+if matrixbox:\n
+  for dimension_result in dimension_result_list:\n
+    dimension_ids_list.append(\n
+              [(x.getObject().getId(),\n
+                x.getObject().getTitle()) for x in dimension_result])\n
+else :\n
+  for dimension_result in dimension_result_list :\n
+    dimension_ids_list.append(\n
+          [x.getObject().getId() for x in dimension_result])\n
+\n
+return dimension_ids_list\n
+# vim: syntax=python\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>matrixbox=0, list_dimensions=0, **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>2</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>matrixbox</string>
+                            <string>list_dimensions</string>
+                            <string>kw</string>
+                            <string>dimension_list</string>
+                            <string>_getiter_</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>pred</string>
+                            <string>dimension_result_list</string>
+                            <string>dimension</string>
+                            <string>None</string>
+                            <string>append</string>
+                            <string>$append0</string>
+                            <string>x</string>
+                            <string>predicate_list</string>
+                            <string>len</string>
+                            <string>dimension_ids_list</string>
+                            <string>dimension_result</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <int>0</int>
+                <int>0</int>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>PaymentSimulationRule_asCellRange</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=32936&r1=32935&r2=32936&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Mon Feb 22 12:37:27 2010
@@ -1,1 +1,1 @@
-1115
+1116




More information about the Erp5-report mailing list