diff --git a/sale_cost.py b/sale_cost.py index 2a3a21f..d391ec4 100644 --- a/sale_cost.py +++ b/sale_cost.py @@ -54,3 +54,7 @@ class SaleCost(ApplyMethodCostDocumentMixin, metaclass=PoolMeta): invisible_condition, Not(Bool(Eval('invoice_lines')))) cls._buttons['unapply']['depends'].append('invoice_lines') + + @property + def non_explodable(self): + return super().non_explodable or bool(self.invoice_lines)