Commit 9f58a967 authored by Romain Courteaud's avatar Romain Courteaud

Fix compatibility between RelationField and ProxyField.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11659 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 61540fb3
......@@ -143,6 +143,7 @@ class RelationStringFieldValidator(
RelationStringFieldWidgetInstance = RelationStringFieldWidget()
RelationStringFieldValidatorInstance = RelationStringFieldValidator()
# Should RelationStringField be a subclass of MultiRelationStringField ?
class RelationStringField(ZMIField):
meta_type = "RelationStringField"
security = ClassSecurityInfo()
......@@ -162,3 +163,18 @@ class RelationStringField(ZMIField):
else:
result = ZMIField.get_orig_value(self, id)
return result
security.declareProtected('Access contents information', 'get_value')
def get_value(self, id, REQUEST=None, **kw):
"""Get value for id.
Optionally pass keyword arguments that get passed to TALES
expression.
"""
# XXX FIXME Same code as MultiRelationStringField
if (id == 'items') and (REQUEST is not None):
# relation_item_list is not editable for the RelationField
result = REQUEST.get('relation_item_list', None)
else:
result = ZMIField.get_value(self, id, **kw)
return result
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