diff --git a/product/ERP5/Document/SolverDecision.py b/product/ERP5/Document/SolverDecision.py index 6273df8cefee781314d887380df58b154eb3d49d..74874545adf6ba34cac9c2a6dccef5c5d95da18e 100644 --- a/product/ERP5/Document/SolverDecision.py +++ b/product/ERP5/Document/SolverDecision.py @@ -117,13 +117,17 @@ class SolverDecision(ConfigurableMixin, XMLObject): Returns the HTML message that describes the detail of divergences to be solved with this Solver Decision. """ - simulation_movement_list = self.getSolverRelatedValueList() + movement_list = self.getDeliveryValueList() message_list = [] for tester in self.getCausalityValueList(): - for simulation_movement in simulation_movement_list: - if all or len(message_list) == 0: - message_list.append(tester.getExplanationMessage(simulation_movement)) - elif len(message_list) == 1: - # XXX it should be a link to the detailed view. - message_list.append('...') + for movement in movement_list: + for simulation_movement in movement.getDeliveryRelatedValueList(): + message = tester.getExplanationMessage(simulation_movement) + if message is None: + continue + if all or len(message_list) == 0: + message_list.append(message) + elif len(message_list) == 1: + # XXX it should be a link to the detailed view. + message_list.append('...') return ''.join(message_list) diff --git a/product/ERP5/mixin/equivalence_tester.py b/product/ERP5/mixin/equivalence_tester.py index 30f23c89667f7bcfca8ae90c096ef32bf4f21246..fe60fff90ae1a46e8758ff966fe78479bb327504 100644 --- a/product/ERP5/mixin/equivalence_tester.py +++ b/product/ERP5/mixin/equivalence_tester.py @@ -162,6 +162,8 @@ class EquivalenceTesterMixin: divergence. """ divergence_message = self.explain(simulation_movement) + if divergence_message is None: + return None # XXX explanation message should be provided by each class, each # portal type or each document. message = '<a href="${decision_url}">${property_name} of ${decision_value} of ${decision_type} ${decision_title}</a> of <a href="${delivery_url}">${delivery_title}</a> is different from <a href="${prevision_url}">planned ${property_name} of ${prevision_value}</a>.'