From cdde1513957311ad5a822b2b3882d8dadcf03fdc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com>
Date: Fri, 30 Apr 2010 09:19:32 +0000
Subject: [PATCH] when automatically disabling preferences, only do with those
 which has the same portal type as the original

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34877 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../preference_workflow/scripts/disableOtherPreferences.xml    | 3 ++-
 product/ERP5/bootstrap/erp5_core/bt/revision                   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/scripts/disableOtherPreferences.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/scripts/disableOtherPreferences.xml
index b21c2af225..ced60b231f 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/scripts/disableOtherPreferences.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/scripts/disableOtherPreferences.xml
@@ -66,7 +66,8 @@ for p in portal.portal_preferences.searchFolder():\n
     if portal.portal_membership.getAuthenticatedMember().allowed(p, [\'Owner\', ]) :\n
       if p != pref and \\\n
          p.getPreferenceState() == \'enabled\' and \\\n
-         p.getPriority() == pref.getPriority() :\n
+         p.getPriority() == pref.getPriority() and \\\n
+         p.getPortalType() == pref.getPortalType() :\n
         p.portal_workflow.doActionFor(p,\n
            \'disable_action\',\n
            wf_id=\'preference_workflow\', \n
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index 09b9bb39e9..239cbd5e34 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-1575
\ No newline at end of file
+1577
-- 
2.30.9