diff --git a/product/ERP5Form/MultiRelationField.py b/product/ERP5Form/MultiRelationField.py index 0ca8dc1d440b65c1bd6e7ad0475f4a0f01599b94..68da5eae93ae40464ffe4af1d12766b4ced97dc6 100755 --- a/product/ERP5Form/MultiRelationField.py +++ b/product/ERP5Form/MultiRelationField.py @@ -342,7 +342,10 @@ class MultiRelationStringFieldValidator(Validator.LinesValidator, RelationField catalog_index = field.get_value('catalog_index') relation_setter_id = field.get_value('relation_setter_id') - if checkSameKeys( value_list, current_value_list ): + relation_field_id = 'relation_%s' % ( key ) + # we must know if user validate the form or click on the wheel button + relation_uid_list = REQUEST.get(relation_field_id, None) + if checkSameKeys( value_list, current_value_list ) and (relation_uid_list is None): # XXX Will be interpreted by Base_edit as "do nothing" #return MultiRelationEditor(field.id, base_category, portal_type, portal_type_item, catalog_index, relation_setter_id, None) return None diff --git a/product/ERP5Form/RelationField.py b/product/ERP5Form/RelationField.py index 76ff6768833bf5bd1cd1fd2fb790f55b058c812a..8802d0a84cec3722e1eb267746fea34cfcdfec1e 100755 --- a/product/ERP5Form/RelationField.py +++ b/product/ERP5Form/RelationField.py @@ -316,7 +316,8 @@ class RelationStringFieldValidator(Validator.StringValidator): parameter_list = field.get_value('parameter_list') relation_setter_id = field.get_value('relation_setter_id') - if value == current_value: + if (value == current_value) and (relation_uid is None): + LOG('RelationStringFieldValidator, validate',0,'Same value, but relation_uid: %s' % str(relation_uid) ) return None # XXX return RelationEditor(key, base_category, portal_type, None, # portal_type_item, catalog_index, value, relation_setter_id, None)