From cfbe07d60280db4f94f533748190e9e43c43a9e5 Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Thu, 25 Nov 2010 16:50:29 +0000
Subject: [PATCH] Restrict display of aggregated_items on Order views if
 context is a movement and if there no variation categories configured.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40730 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_trade/Movement_isAggregateItemListEnabled.xml          | 2 +-
 bt5/erp5_trade/bt/revision                                      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Movement_isAggregateItemListEnabled.xml b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Movement_isAggregateItemListEnabled.xml
index f0cee690f8..ac59d55e45 100644
--- a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Movement_isAggregateItemListEnabled.xml
+++ b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Movement_isAggregateItemListEnabled.xml
@@ -54,7 +54,7 @@
 for Base_viewTradeFieldLibrary/my_view_mode_aggregate_title_list.enable\n
 """\n
 \n
-if context.getResource() and context.getResourceValue().getAggregatedPortalTypeList():\n
+if context.getResource() and context.getResourceValue().getAggregatedPortalTypeList() and context.isMovement() and not context.getVariationCategoryList():\n
   return True\n
 if context.getAggregate():\n
   return True\n
diff --git a/bt5/erp5_trade/bt/revision b/bt5/erp5_trade/bt/revision
index 35fb939936..337488c9dc 100644
--- a/bt5/erp5_trade/bt/revision
+++ b/bt5/erp5_trade/bt/revision
@@ -1 +1 @@
-1041
\ No newline at end of file
+1042
\ No newline at end of file
-- 
2.30.9