Commit b8de8148 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Since r33947, 'solver' value of Simulation Movements is no longer Solver...

Since r33947, 'solver' value of Simulation Movements is no longer Solver Decision, so we gather divergence message from Solver Decision's 'delivery' values.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34037 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f43b08fb
No related merge requests found
......@@ -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)
......@@ -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>.'
......
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