[Erp5-report] r17804 - /erp5/trunk/products/ERP5/Document/Inventory.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Nov 27 09:18:03 CET 2007


Author: aurel
Date: Tue Nov 27 09:18:02 2007
New Revision: 17804

URL: http://svn.erp5.org?rev=17804&view=rev
Log:
at least reindex inventory object in catalog

Modified:
    erp5/trunk/products/ERP5/Document/Inventory.py

Modified: erp5/trunk/products/ERP5/Document/Inventory.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Inventory.py?rev=17804&r1=17803&r2=17804&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Inventory.py (original)
+++ erp5/trunk/products/ERP5/Document/Inventory.py Tue Nov 27 09:18:02 2007
@@ -97,14 +97,21 @@
     to have our own temp object constructor, this is usefull if we
     want to use some classes with some particular methods
     """
+    sql_catalog_id = kw.pop("sql_catalog_id", None)
+    disable_archive = kw.pop("disable_archive", 0)
+
     if self.getSimulationState() in self.getPortalDraftOrderStateList():
       # this prevent from trying to calculate stock
       # with not all properties defined and thus making
       # request with no condition in mysql
+      object_list = [self]
+      immediate_reindex_archive = sql_catalog_id is not None    
+      self.portal_catalog.catalogObjectList(object_list,
+                                            sql_catalog_id = sql_catalog_id,
+                                            disable_archive=disable_archive,
+                                            immediate_reindex_archive=immediate_reindex_archive)      
       return
     
-    sql_catalog_id = kw.pop("sql_catalog_id", None)
-    disable_archive = kw.pop("disable_archive", 0)
     connection_id = None
     if sql_catalog_id is not None:
       # try to get connection used in the catalog 




More information about the Erp5-report mailing list