From 57a2077ccc044877ac83873e08cf4a4825fddf41 Mon Sep 17 00:00:00 2001 From: Mame Coumba Sall <mame@nexedi.com> Date: Thu, 18 Dec 2008 13:16:00 +0000 Subject: [PATCH] 2008-12-18 mame *modify script so that report can hide positive and negative stock at the same time, or positive and zero stock or negative and zero stock git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24939 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_trade/Base_getBySiteCurrentStockList.xml | 14 ++++++++++---- bt5/erp5_trade/bt/revision | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_getBySiteCurrentStockList.xml b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_getBySiteCurrentStockList.xml index f2c3028bc8..adecd62485 100644 --- a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_getBySiteCurrentStockList.xml +++ b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_getBySiteCurrentStockList.xml @@ -79,12 +79,18 @@ for x in context.portal_simulation.getCurrentInventoryList(\n # XXX resourceType= uses movement table.\n # resource_portal_type= does not work with cells (because resource is acquired from line)\n resourceType=context.getPortalProductTypeList(), **kw):\n - if x.inventory <=0 and positive_stock:\n + if positive_stock and negative_stock and not zero_stock and x.inventory == 0:\n result_list.append(x)\n - if x.inventory>=0 and negative_stock:\n + if positive_stock and not negative_stock and zero_stock and x.inventory <0:\n + result_list.append(x)\n + if negative_stock and zero_stock and not positive_stock and x.inventory >0:\n + result_list.append(x)\n + if positive_stock and not negative_stock and not zero_stock and x.inventory <=0:\n + result_list.append(x)\n + if negative_stock and not positive_stock and not zero_stock and x.inventory >=0:\n + result_list.append(x)\n + if zero_stock and not positive_stock and not negative_stock and x.inventory!=0:\n result_list.append(x)\n - if x.inventory!=0 and zero_stock:\n - result_list.append(x) \n if not positive_stock and not negative_stock and not zero_stock:\n result_list.append(x)\n \n diff --git a/bt5/erp5_trade/bt/revision b/bt5/erp5_trade/bt/revision index 55a318f19d..4a722e9c7f 100644 --- a/bt5/erp5_trade/bt/revision +++ b/bt5/erp5_trade/bt/revision @@ -1 +1 @@ -551 \ No newline at end of file +552 \ No newline at end of file -- 2.30.9