From 0e2b70bbc456ab70e2b77dd531479ab3d30ce2fe Mon Sep 17 00:00:00 2001 From: Sergio Morillo Date: Tue, 14 Jan 2020 12:00:04 +0100 Subject: [PATCH] Allow to go back with applied costs. This commit refs #11363 --- sale_cost.py | 4 ++++ 1 file changed, 4 insertions(+) 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)