diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-08-02 10:08:08 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-08-02 10:08:08 +0700 |
| commit | 316e94f7fd4e8c065c95b800341c48d6c84263a9 (patch) | |
| tree | efb42457560949e61f9b7e179ef5961f08020b70 | |
| parent | 9287c7fffe1db2e429c7baf6e740f9dc79ec33a2 (diff) | |
validasi npwp action confirm
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 4 |
1 files changed, 3 insertions, 1 deletions
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 |
