Commit 8c6631fc authored by Jean-Paul Smets's avatar Jean-Paul Smets

addPermission changed to addPortalContent

fixed Solanes typo
use of base_category instead of base_category_id


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@402 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7130f5f3
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solane <jp@nexedi.com> # Jean-Paul Smets-Solanes <jp@nexedi.com>
# #
# WARNING: This program as such is intended to be used by professional # WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential # programmers who take the whole responsability of assessing all potential
...@@ -44,7 +44,7 @@ class SetMappedValue(ERP5SetMappedValue): ...@@ -44,7 +44,7 @@ class SetMappedValue(ERP5SetMappedValue):
""" """
meta_type = 'CORAMY Set Mapped Value' meta_type = 'CORAMY Set Mapped Value'
portal_type = 'Set Mapped Value' portal_type = 'Set Mapped Value'
add_permission = Permissions.AddERP5Content add_permission = Permissions.AddPortalContent
isPortalContent = 1 isPortalContent = 1
isRADContent = 1 isRADContent = 1
...@@ -119,11 +119,11 @@ identify a bank account.""" ...@@ -119,11 +119,11 @@ identify a bank account."""
""" """
result = 1 result = 1
for c in self.getPredicateValueList(): for c in self.getPredicateValueList():
base_category_id = c.split('/')[0] base_category = c.split('/')[0]
if base_category_id in ('coloris', 'morphologie', 'variante'): if base_category in ('coloris', 'morphologie', 'variante'):
# Classes of equivalences # Classes of equivalences
category_id = c.split('/')[-1] category_id = c.split('/')[-1]
for context_category in context._getCategoryMembershipList(base_category_id, base=1): for context_category in context._getCategoryMembershipList(base_category, base=1):
#result = result and (context_category.find(category_id) >= 0) #result = result and (context_category.find(category_id) >= 0)
result = result and (context_category.split('/')[-1] == category_id) result = result and (context_category.split('/')[-1] == category_id)
else: else:
......
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