diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-03-07 10:39:00 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-03-07 10:39:00 +0700 |
| commit | 3b8b4ec20d523cedf00d0a343ffc244e0a43da58 (patch) | |
| tree | 234c599d3e0819cfd3d84deb20351432c5f5dce7 | |
| parent | 5d7bf2741610d1aecb20b7d28d76e800941025ee (diff) | |
<iman> when change name(individu) then nama pajak change
| -rw-r--r-- | indoteknik_custom/models/res_partner.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indoteknik_custom/models/res_partner.py b/indoteknik_custom/models/res_partner.py index 7e574a72..fa2f6a81 100644 --- a/indoteknik_custom/models/res_partner.py +++ b/indoteknik_custom/models/res_partner.py @@ -470,4 +470,9 @@ class ResPartner(models.Model): 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 + raise UserError("NITKU harus memiliki tepat 22 angka.") + + @api.onchange('name') + def _onchange_name(self): + if self.company_type == 'person': + self.nama_wajib_pajak = self.name
\ No newline at end of file |
