From 5548163a5af633de45a65795969f6e1b8b61c571 Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Wed, 25 Jan 2006 16:33:53 +0000
Subject: [PATCH] Added custom relative url

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5318 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/Domain.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/product/ERP5/Document/Domain.py b/product/ERP5/Document/Domain.py
index b742dfd85c..3ef7ed1e34 100755
--- a/product/ERP5/Document/Domain.py
+++ b/product/ERP5/Document/Domain.py
@@ -76,3 +76,11 @@ class Domain(Predicate, MetaNode, MetaResource):
 
   # Declarative interfaces
   __implements__ = ( Interface.Predicate, )
+
+  security.declareProtected( Permissions.AccessContentsInformation, 'getRelativeUrl' )
+  def getRelativeUrl(self):
+    """
+      We must eliminate portal_categories in the RelativeUrl
+      since it is never present in the category list
+    """
+    return '/'.join(self.portal_url.getRelativeContentPath(self)[1:])
-- 
2.30.9