From 316e94f7fd4e8c065c95b800341c48d6c84263a9 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 2 Aug 2023 10:08:08 +0700 Subject: validasi npwp action confirm --- indoteknik_custom/models/sale_order.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index d73ad28f..25d28bbb 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -490,7 +490,9 @@ class SaleOrder(models.Model): raise UserError("Tax di Header harus diisi") if not order.carrier_id: raise UserError("Shipping Method harus diisi") - # approval1 = approval2 = 0 + if '-' not in order.npwp or '.' not in order.npwp: + raise UserError("Isi NPWP Dengan Benar!") + for line in order.order_line: if not line.product_id or line.product_id.type == 'service': continue -- cgit v1.2.3