diff --git a/product/ERP5/Document/Delivery.py b/product/ERP5/Document/Delivery.py index e72aa7460cf3c448cc9a0272a901df0f64ae8c45..c97be1795a854fa76077f62c0d5d97e9760343bc 100644 --- a/product/ERP5/Document/Delivery.py +++ b/product/ERP5/Document/Delivery.py @@ -380,7 +380,10 @@ class Delivery(XMLObject, ImmobilisationDelivery, CompositionMixin): if isTransitionPossible(self, 'diverge') and \ isTransitionPossible(self, 'converge'): if self.isDivergent(**kw): - if solve_automatically and \ + # If delivery is not simulated (PackingList.isDivergent() + # returns True in such a case), we cannot solve divergence + # anyway. + if self.isSimulated() and solve_automatically and \ isTransitionPossible(self, 'solve_automatically'): self.solveAutomatically() else: