diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-08-02 09:56:31 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-08-02 09:56:31 +0700 |
| commit | 9287c7fffe1db2e429c7baf6e740f9dc79ec33a2 (patch) | |
| tree | 171d73bd55344119fd0b056e18b0f3af93a9718f | |
| parent | 647df532baf5452c3d6d89b8acbd30dd4fb0ea11 (diff) | |
validasi npwp so
| -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 e83ded6c..d73ad28f 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -337,7 +337,9 @@ class SaleOrder(models.Model): raise UserError("Status harus draft atau sent") if not order.partner_invoice_id.npwp: raise UserError("NPWP harus diisi di master data konsumen, jika non pkp dapat diisi 00.000.000.0-000.000") - + if '-' not in order.npwp or '.' not in order.npwp: + raise UserError("Isi NPWP Dengan Benar!") + if order.partner_id.parent_id: if not order.partner_id.parent_id.property_payment_term_id: raise UserError("Payment Term pada Master Data Customer harus diisi") |
