From 8b994b3eff035c981c83b3507234db4c95542d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Tue, 29 Apr 2008 14:13:25 +0000 Subject: [PATCH] MappedValue.getProperty does the same as what Base.getProperty does now (excepts that it acquires the value from parent, which is wrong here) -> remove MappedValue.getProperty. Also remove MappedValue.setProperty which has been commented out some times ago for similar reasons git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20844 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/MappedValue.py | 42 ---------------------------- 1 file changed, 42 deletions(-) diff --git a/product/ERP5/Document/MappedValue.py b/product/ERP5/Document/MappedValue.py index 6a991adc36..1d6fa8bbbb 100644 --- a/product/ERP5/Document/MappedValue.py +++ b/product/ERP5/Document/MappedValue.py @@ -89,48 +89,6 @@ class MappedValue(Predicate, Amount): self._setProperty('mapped_value_property_set', kw['mapped_value_property_set']) Predicate._edit(self, REQUEST=REQUEST, force_update = force_update, **kw) - security.declareProtected( Permissions.AccessContentsInformation, 'getProperty' ) - def getProperty(self, key, d=None, evaluate=1): - """ - Generic accessor. First we check if the value - exists. Else we call the real accessor - """ - #try: - if 1: - # If mapped_value_property_list is not set - # then it creates an exception - if key in self.getMappedValuePropertyList([]): - if hasattr(self, key): - return getattr(self, key) - #except: - # LOG("WARNING: ERP5", 0, 'Could not access mapped value property %s' % key) - # return None - # Standard accessor - try: - result = Predicate.getProperty(self, key, d=d) - except AttributeError: - result = None - return result - -# security.declareProtected( Permissions.ModifyPortalContent, '_setProperty' ) -# def _setProperty(self, key, value, type='string', **kw): -# """ -# Generic accessor. Calls the real accessor -# -# **kw allows to call setProperty as a generic setter (ex. setProperty(value_uid, portal_type=)) -# """ -# #try: -# if 1: -# # If mapped_value_attribute_list is not set -# # then it creates an exception -# if key in self.getMappedValuePropertyList([]): -# return setattr(self, key, value) -# #except: -# # LOG("WARNING: ERP5", 0, 'Could not set mapped value property %s' % key) -# # return -# -# return Predicate._setProperty(self, key, value, type=type, **kw) - # Compatibility method def getMappedValuePropertyList(self, *args): """ -- 2.30.9