From 2475524b79d5274f00f11c08252e0e3828d20e75 Mon Sep 17 00:00:00 2001
From: Yoshinori Okuji <yo@nexedi.com>
Date: Sat, 22 May 2010 00:52:17 +0000
Subject: [PATCH] Use the portal object instead of self to acquire
 portal_domains and getPortalSupplyPathTypeList.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35542 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/Resource.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/Document/Resource.py b/product/ERP5/Document/Resource.py
index 612cbc6179..c17380b4f1 100644
--- a/product/ERP5/Document/Resource.py
+++ b/product/ERP5/Document/Resource.py
@@ -679,9 +679,10 @@ class Resource(XMLMatrix, Variated):
         new_category_list += (resource_category, )
       # Generate the predicate mapped value
       # to get some price values.
-      domain_tool = getToolByName(self,'portal_domains')
+      portal = self.getPortalObject()
+      domain_tool = getToolByName(portal, 'portal_domains')
       if supply_path_type is None:
-        portal_type_list = self.getPortalSupplyPathTypeList()
+        portal_type_list = portal.getPortalSupplyPathTypeList()
       elif isinstance(supply_path_type, (list, tuple)):
         portal_type_list = supply_path_type
       else:
-- 
2.30.9