[Erp5-report] r44555 aurel - in /erp5/trunk/bt5/erp5_banking_core: SkinTemplateItem/portal_...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 24 11:31:34 CET 2011


Author: aurel
Date: Thu Mar 24 11:31:34 2011
New Revision: 44555

URL: http://svn.erp5.org?rev=44555&view=rev
Log:
override InventoryModule_reindexMovementList as start_date is available
only in catalog table in erp5_banking's catalog

Added:
    erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/InventoryModule_reindexMovementList.xml
Modified:
    erp5/trunk/bt5/erp5_banking_core/bt/revision

Added: erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/InventoryModule_reindexMovementList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/InventoryModule_reindexMovementList.xml?rev=44555&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/InventoryModule_reindexMovementList.xml (added)
+++ erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/InventoryModule_reindexMovementList.xml [utf8] Thu Mar 24 11:31:34 2011
@@ -0,0 +1,95 @@
+<?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># Inventory requires reindexing when older movements become available, because\n
+# inventory generates deltas against the past stock, using a catalog. It is only\n
+# necessary to reindex Inventory documents instead of Inventory movements, because\n
+# Inventory reindexes its movements in a special way to the stock table by itself.\n
+#\n
+# FIXME: I think it would be better to replace this script with a good interactor\n
+# which reindexes future inventory documents.\n
+\n
+previous_tag = None\n
+portal = context.getPortalObject()\n
+\n
+# We have to reindex all inventory documents in the order of the dates.\n
+# Uids are used to make the ordering consistent, even when multiple documents have\n
+# the same date.\n
+for inventory in portal.portal_catalog(portal_type=portal.getPortalInventoryTypeList(),\n
+                                       limit=None,\n
+                                       sort_on=[(\'catalog.start_date\', \'ascending\'), (\'uid\', \'ascending\')],\n
+                                       sql_catalog_id=sql_catalog_id):\n
+  inventory = inventory.getObject()\n
+  tag = \'inventory_%i\' % inventory.getUid()\n
+  activate_kw = dict(tag=tag, passive_commit=passive_commit)\n
+  if previous_tag is not None:\n
+    activate_kw[\'after_tag\'] = previous_tag\n
+  previous_tag = tag\n
+  inventory.reindexObject(activate_kw=activate_kw, sql_catalog_id=sql_catalog_id)\n
+\n
+if final_activity_tag is not None and previous_tag is not None:\n
+  # Dummy activity used to determine if the previously started activities are over.\n
+  context.activate(tag=final_activity_tag, after_tag=previous_tag).getId()\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>sql_catalog_id=None, passive_commit=1, final_activity_tag=None, **kw</string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>InventoryModule_reindexMovementList</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_banking_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/bt/revision?rev=44555&r1=44554&r2=44555&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_banking_core/bt/revision [utf8] Thu Mar 24 11:31:34 2011
@@ -1 +1 @@
-558
\ No newline at end of file
+559



More information about the Erp5-report mailing list