From fbd38c13c465625e4c42c2da9870fcbaf49994ac Mon Sep 17 00:00:00 2001 From: Yoshinori Okuji <yo@nexedi.com> Date: Thu, 29 Apr 2004 09:42:39 +0000 Subject: [PATCH] **kw allows to call setProperty as a generic setter. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@774 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/MappedValue.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/product/ERP5/Document/MappedValue.py b/product/ERP5/Document/MappedValue.py index 97b25b6cba..04b2a59707 100755 --- a/product/ERP5/Document/MappedValue.py +++ b/product/ERP5/Document/MappedValue.py @@ -153,9 +153,11 @@ identify a bank account.""" return result security.declareProtected( Permissions.ModifyPortalContent, '_setProperty' ) - def _setProperty(self, key, value, type='string'): + 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: @@ -168,7 +170,7 @@ identify a bank account.""" # return accessor_name = 'set' + UpperCase(key) method = getattr(self, accessor_name) - return method(value) + return method(value, **kw) # Compatibility method def getMappedValuePropertyList(self, *args): -- 2.30.9