[Erp5-report] r24953 - /erp5/trunk/products/ERP5/Extensions/InventoryBrain.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Dec 19 17:44:24 CET 2008


Author: vincent
Date: Fri Dec 19 17:44:22 2008
New Revision: 24953

URL: http://svn.erp5.org?rev=24953&view=rev
Log:
buildSQLQuery is expected to generate a join on catalog table (Delivery_zGetTotal uses catalog table but does not have it in its "from" expression).

Modified:
    erp5/trunk/products/ERP5/Extensions/InventoryBrain.py

Modified: erp5/trunk/products/ERP5/Extensions/InventoryBrain.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Extensions/InventoryBrain.py?rev=24953&r1=24952&r2=24953&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Extensions/InventoryBrain.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Extensions/InventoryBrain.py [utf8] Fri Dec 19 17:44:22 2008
@@ -137,12 +137,11 @@
     Return the quantity of the current delivery for a resource
     """
     total_kw = {
-      'explanation_uid': self.getExplanationUid(),
-      'resource_uid': self.resource_uid,
-      'variation_text': self.variation_text,
+      'movement.explanation_uid': self.getExplanationUid(),
+      'movement.resource_uid': self.resource_uid,
+      'movement.variation_text': self.variation_text,
     }
-    total_kw.update(self.portal_catalog.buildSQLQuery(query_table='movement',
-                                                      **total_kw))
+    total_kw.update(self.portal_catalog.buildSQLQuery(**total_kw))
     result = self.Delivery_zGetTotal(**total_kw)
     inventory = None
     if len(result) > 0:




More information about the Erp5-report mailing list