Commit fbd38c13 authored by Yoshinori Okuji's avatar Yoshinori Okuji

**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
parent 6b7e8a8c
......@@ -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):
......
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