diff --git a/product/ERP5Form/MultiRelationField.py b/product/ERP5Form/MultiRelationField.py index 95ca1bc074f9dc64e2f71fa35b591b815b6660d1..0a49a1dfe6df3f66e63145f42f80af8913b8f678 100755 --- a/product/ERP5Form/MultiRelationField.py +++ b/product/ERP5Form/MultiRelationField.py @@ -149,7 +149,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, RelationField.R # Delete default tales on the fly field.tales['items'] = None - else: + elif field.get_value('jump_allowed') == 1 : html_string += ' <input type="image" src="%s/images/exec16.png" value="update..." name="%s/portal_selections/viewSearchRelatedDocumentDialog%s_%s:method">' \ % (portal_url_string, portal_object.getPath(), field.aq_parent._v_relation_field_index, i) @@ -159,8 +159,9 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, RelationField.R # no modification made, we can display only a lines text area widget html_string += Widget.LinesTextAreaWidget.render(self, field, key, value_list, REQUEST) - html_string += ' <input type="image" src="%s/images/exec16.png" value="update..." name="%s/portal_selections/viewSearchRelatedDocumentDialog%s:method">' \ - % (portal_url_string, portal_object.getPath(), field.aq_parent._v_relation_field_index) + if field.get_value('jump_allowed') == 1 : + html_string += ' <input type="image" src="%s/images/exec16.png" value="update..." name="%s/portal_selections/viewSearchRelatedDocumentDialog%s:method">' \ + % (portal_url_string, portal_object.getPath(), field.aq_parent._v_relation_field_index) if value_list not in ((), [], None, ['']) and value_list == field.get_value('default') and field.get_value('jump_allowed') == 1 : if REQUEST.get('selection_name') is not None: diff --git a/product/ERP5Form/RelationField.py b/product/ERP5Form/RelationField.py index 4ca31376aed32b165071e423deaaa09e24f68020..7e68695965c2060988c4128e58887b2522e37bfa 100755 --- a/product/ERP5Form/RelationField.py +++ b/product/ERP5Form/RelationField.py @@ -181,7 +181,7 @@ class RelationStringFieldWidget(Widget.TextWidget, Widget.ListWidget): # we compare what has been changed in the relation update script #elif value != field.get_value('default'): - else: + elif field.get_value('jump_allowed') == 1 : html_string += ' <input type="image" src="%s/images/exec16.png" value="update..." name="%s/portal_selections/viewSearchRelatedDocumentDialog%s:method">' \ % (portal_url_string, portal_object.getPath(), getattr(field.aq_parent, '_v_relation_field_index', 0))