Commit 71dec02d authored by Sebastien Robin's avatar Sebastien Robin

set the default resource to self in order to get the right supply line or cell


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3187 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent daea76bb
...@@ -511,7 +511,15 @@ class Resource(XMLMatrix, CoreResource, Variated): ...@@ -511,7 +511,15 @@ class Resource(XMLMatrix, CoreResource, Variated):
def getPrice(self, context=None, REQUEST=None, **kw): def getPrice(self, context=None, REQUEST=None, **kw):
""" """
""" """
tmp_context = self.asContext(context=context, REQUEST=REQUEST, **kw) category_list = self.getCategoryList()
if context is not None:
category_list += context.getCategoryList()
if not 'resource' in [x.split('/')[0] for x in category_list]:
category_list += ('resource/' + self.getRelativeUrl(),)
tmp_context = self.asContext(context=context,
categories=category_list,
REQUEST=REQUEST, **kw)
domain_tool = getToolByName(self,'portal_domains') domain_tool = getToolByName(self,'portal_domains')
portal_type_list = self.getPortalSupplyTypeList() portal_type_list = self.getPortalSupplyTypeList()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment