From e7eadc269299d03f6eb0702459147a2900b982b4 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Tue, 11 Feb 2025 09:03:25 +0700 Subject: update code blocking state --- indoteknik_custom/models/sale_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 5c223beb..9631fe6e 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -952,7 +952,7 @@ class SaleOrder(models.Model): remaining_credit_limit = block_stage - current_total - so_to_invoice # Validasi limit - if remaining_credit_limit <= 0: + if remaining_credit_limit <= 0 and block_stage > 0: raise UserError(_("The credit limit for %s will exceed the Blocking Stage if the Sale Order is confirmed. The remaining credit limit is %s, from %s and the outstanding amount is %s.") % (rec.partner_id.name, block_stage - current_total, block_stage, outstanding_amount)) -- cgit v1.2.3