From b846d7a7243b6117fb46e886ba1c558da8a919a8 Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Tue, 29 Jul 2008 14:41:14 +0000 Subject: [PATCH] Avoid calling portal_catalog for each brain git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22725 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Extensions/InventoryBrain.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/product/ERP5/Extensions/InventoryBrain.py b/product/ERP5/Extensions/InventoryBrain.py index 7690785c50..b19f941e97 100644 --- a/product/ERP5/Extensions/InventoryBrain.py +++ b/product/ERP5/Extensions/InventoryBrain.py @@ -290,7 +290,7 @@ class TrackingListBrain(InventoryListBrain): """ List of aggregated movements """ - def __init__(self): + def getDate(self): if not self.date: return # convert the date in the movement's original timezone. @@ -302,7 +302,8 @@ class TrackingListBrain(InventoryListBrain): date = movement.getStartDate() or movement.getStopDate() if date is not None: timezone = date.timezone() - self.date = self.date.toZone(timezone) + return self.date.toZone(timezone) + return self.date class DeliveryListBrain(InventoryListBrain): """ -- 2.30.9