From d41aa37039e7d2c8bc608ac2db05787129bc8c39 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 10 Apr 2007 14:29:17 +0000
Subject: [PATCH] When we just need a random tag, we don't neet to use
 portal_ids.generateNewLongId, but simply random.randint

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14035 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 ...ngTransactionModule_createRelatedPaymentTransactionList.xml | 3 ++-
 bt5/erp5_accounting/bt/revision                                | 2 +-
 .../portal_skins/erp5_core/Folder_modifyWorkflowStatus.xml     | 3 ++-
 product/ERP5/bootstrap/erp5_core/bt/revision                   | 2 +-
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml
index 58d48c7e99..6158ed379d 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml
@@ -99,7 +99,7 @@ if len(object_list) >= 1000:\n
         context.absolute_url(), N_(\n
          \'Refusing to process more than 1000 objects, check your selection\')))\n
 \n
-tag = \'payment_creation_%s\' % portal.portal_ids.generateNewLongId()\n
+tag = \'payment_creation_%s\' % random.randint(0, 1000)\n
 activated = 0\n
 for obj in object_list:\n
   if obj.portal_type in invoice_type_list:\n
@@ -200,6 +200,7 @@ return context.REQUEST.RESPONSE.redirect(\n
                             <string>object_list</string>
                             <string>dict</string>
                             <string>len</string>
+                            <string>random</string>
                             <string>tag</string>
                             <string>activated</string>
                             <string>obj</string>
diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision
index 104fcf5b4e..e0c1820214 100644
--- a/bt5/erp5_accounting/bt/revision
+++ b/bt5/erp5_accounting/bt/revision
@@ -1 +1 @@
-243
\ No newline at end of file
+244
\ No newline at end of file
diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyWorkflowStatus.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyWorkflowStatus.xml
index 2f1593bc57..21352f3523 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyWorkflowStatus.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyWorkflowStatus.xml
@@ -108,7 +108,7 @@ if len_selection_list == context.countFolder():\n
   value_error = N_("Refusing to process the entire module")\n
 else:\n
   # generate a random tag\n
-  tag = \'folder_workflow_action_%s\' % portal.portal_ids.generateNewLongId()\n
+  tag = \'folder_workflow_action_%s\' % random.randint(0, 1000)\n
 \n
   processed_object_count = 0    \n
   for o in selection_list:\n
@@ -219,6 +219,7 @@ return request.RESPONSE.redirect( redirect_url )\n
                             <string>len</string>
                             <string>len_selection_list</string>
                             <string>value_error</string>
+                            <string>random</string>
                             <string>tag</string>
                             <string>processed_object_count</string>
                             <string>o</string>
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index e6d11f621d..6eac4a65cd 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-291
\ No newline at end of file
+292
\ No newline at end of file
-- 
2.30.9