diff --git a/product/ERP5/Document/SimulationMovement.py b/product/ERP5/Document/SimulationMovement.py index c128718ea87d97011a3026d55f7a1c4579b1dd87..b6a6cb672b97347c97c874810c584ef9441e9cc5 100644 --- a/product/ERP5/Document/SimulationMovement.py +++ b/product/ERP5/Document/SimulationMovement.py @@ -313,10 +313,10 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin): delivery_value = self.getDeliveryValue() if delivery_value is None: # If the parent is not an Applied Rule, self does not have the method. - if getattr(self, 'getRootAppliedRule', None) is not None: - ra = self.getRootAppliedRule() - else: + getRootAppliedRule = getattr(self, 'getRootAppliedRule', None) + if getRootAppliedRule is None: return None + ra = getRootAppliedRule() order = ra.getCausalityValue() if order is not None: return order