diff options
| author | trisusilo48 <tri.susilo@altama.co.id> | 2025-01-20 09:27:06 +0700 |
|---|---|---|
| committer | trisusilo48 <tri.susilo@altama.co.id> | 2025-01-20 09:27:06 +0700 |
| commit | 464292a0eb2b9353f499a541991e4d88a76c2d82 (patch) | |
| tree | f8287645e73b4c23cad3e3dc50af177d34a51b94 /indoteknik_custom/models/res_partner.py | |
| parent | e3e7f29ad939a774878316e46e10a5c1370fda77 (diff) | |
| parent | 1b2b27941fcdaa1b1b6ddf2a4851d358abb259eb (diff) | |
Merge branch 'odoo-production' into feature/integrasi_biteship
# Conflicts:
# indoteknik_custom/security/ir.model.access.csv
Diffstat (limited to 'indoteknik_custom/models/res_partner.py')
| -rw-r--r-- | indoteknik_custom/models/res_partner.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indoteknik_custom/models/res_partner.py b/indoteknik_custom/models/res_partner.py index 57fab403..f081e274 100644 --- a/indoteknik_custom/models/res_partner.py +++ b/indoteknik_custom/models/res_partner.py @@ -102,6 +102,7 @@ class ResPartner(models.Model): ]) sppkp = fields.Char(string="SPPKP", tracking=True) npwp = fields.Char(string="NPWP", tracking=True) + nitku = fields.Char(string="NITKU", tracking=True) counter = fields.Integer(string="Counter", default=0) leadtime = fields.Integer(string="Leadtime", default=0) digital_invoice_tax = fields.Boolean(string="Digital Invoice & Faktur Pajak") @@ -449,3 +450,10 @@ class ResPartner(models.Model): return partner.property_payment_term_id.name if partner.property_payment_term_id.id else 'Cash Before Delivery (C.B.D)' + @api.constrains('nitku') + def _onchange_nitku(self): + if self.nitku: + if not self.nitku.isdigit(): + raise UserError("NITKU harus berupa angka.") + if len(self.nitku) != 22: + raise UserError("NITKU harus memiliki tepat 22 angka.")
\ No newline at end of file |
