From 083d1dfeaae5868986e5de8e533a5cc5f6352cd8 Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Wed, 6 Jul 2005 15:28:26 +0000 Subject: [PATCH] Modify generation of Applied Rule's ID. Do not copy anymore Rule ID, but simply generate a new one, in order to reduce the length of path in simulation. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3414 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/Rule.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/product/ERP5/Document/Rule.py b/product/ERP5/Document/Rule.py index 7d112f1a34..8459a8558d 100755 --- a/product/ERP5/Document/Rule.py +++ b/product/ERP5/Document/Rule.py @@ -87,12 +87,7 @@ class Rule(XMLObject, Predicate): """ portal_types = getToolByName(self, 'portal_types') if id is None: - if context.getRelativeUrl() == 'portal_simulation': - # Name the rule according to a number (we are at the root of the simulation) - id = context.generateNewId() - else: - # Name the rule according to its instance id - id = self.getId() + id = context.generateNewId() if getattr(aq_base(context), id, None) is None: context.newContent(id=id, portal_type='Applied Rule', specialise_value=self,**kw) return context.get(id) -- 2.30.9