From e8f38a333c43e8e10dd42e977fa49604ee680e42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 12 Nov 2010 13:23:31 +0000
Subject: [PATCH] only allow to select validatedd organisations here

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40237 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../my_preferred_accounting_transaction_source_section.xml      | 2 +-
 bt5/erp5_accounting/bt/revision                                 | 2 +-
 .../erp5_core/Preference_view/my_preferred_section.xml          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Preference_viewAccounting/my_preferred_accounting_transaction_source_section.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Preference_viewAccounting/my_preferred_accounting_transaction_source_section.xml
index 8a62ca6b96..f0c78ccf02 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Preference_viewAccounting/my_preferred_accounting_transaction_source_section.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Preference_viewAccounting/my_preferred_accounting_transaction_source_section.xml
@@ -269,7 +269,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python: [(\'\', \'\')] + [(x.getTitle(), x.getRelativeUrl()) for x in here.portal_categories.resolveCategory(here.getPreferredAccountingTransactionSectionCategory(\'portal_categories\')).getGroupRelatedValueList(portal_type=\'Organisation\', checked_permission=\'View\')]</string> </value>
+            <value> <string>python: [(\'\', \'\')] + [(x.getTitle(), x.getRelativeUrl()) for x in context.portal_catalog( default_group_uid=context.portal_categories.getCategoryUid(context.getPreferredAccountingTransactionSectionCategory(\'portal_categories\')), portal_type=\'Organisation\', validation_state=\'Validated\')]</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision
index b25e64d515..5e2cf217f8 100644
--- a/bt5/erp5_accounting/bt/revision
+++ b/bt5/erp5_accounting/bt/revision
@@ -1 +1 @@
-1385
\ No newline at end of file
+1388
\ No newline at end of file
diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_view/my_preferred_section.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_view/my_preferred_section.xml
index a9d2570918..5a2cf99794 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_view/my_preferred_section.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_view/my_preferred_section.xml
@@ -118,7 +118,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python: [(\'\', \'\')] + [(x.getTitle(), x.getRelativeUrl()) for x in here.portal_categories.resolveCategory(here.getPreferredSectionCategory(\'portal_categories\')).getGroupRelatedValueList(portal_type=\'Organisation\', checked_permission=\'View\')]</string> </value>
+            <value> <string>python: [(\'\', \'\')] + [(x.getTitle(), x.getRelativeUrl()) for x in context.portal_catalog( default_group_uid=context.portal_categories.getCategoryUid(context.getPreferredSectionCategory(\'portal_categories\')), portal_type=\'Organisation\', validation_state=\'Validated\')]</string> </value>
         </item>
       </dictionary>
     </pickle>
-- 
2.30.9