diff options
| author | Indoteknik . <it@fixcomart.co.id> | 2025-08-29 08:18:41 +0700 |
|---|---|---|
| committer | Indoteknik . <it@fixcomart.co.id> | 2025-08-29 08:18:41 +0700 |
| commit | bec429267fd4baca3a914faefba974f18c2695cb (patch) | |
| tree | 37739237e2d9650b866423f844709c68c2171f28 /indoteknik_custom/models/res_partner.py | |
| parent | 83759c763cbde2b179472446231bca007c153449 (diff) | |
| parent | 0112ac064a7484685119cf9371ffbea32de6fd59 (diff) | |
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into pum-v2
Diffstat (limited to 'indoteknik_custom/models/res_partner.py')
| -rw-r--r-- | indoteknik_custom/models/res_partner.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indoteknik_custom/models/res_partner.py b/indoteknik_custom/models/res_partner.py index e5e382a1..148a3fd0 100644 --- a/indoteknik_custom/models/res_partner.py +++ b/indoteknik_custom/models/res_partner.py @@ -29,7 +29,15 @@ class ResPartner(models.Model): reminder_invoices = fields.Boolean( string='Reminder Invoice?', - help='Centang jika kontak ini harus menerima email pengingat invoice.', default=False + help='Centang jika kontak ini harus menerima email pengingat invoice.', default=False, tracking=True + ) + dont_send_reminder_inv_parent = fields.Boolean( + string='Dont Send Reminder Invoices Parent?', + help='Centang jika kontak utama tidak perlu menerima sent Reminder Invoices Otomatis', default=False, tracking=True + ) + dont_send_reminder_inv_all = fields.Boolean( + string='Dont Send Reminder Invoices to All?', + help='Centang jika semua kontak utama dan child tidak menerima sent Reminder Invoices', default=False, tracking=True ) # informasi perusahaan @@ -275,7 +283,7 @@ class ResPartner(models.Model): ('email', '=', record.email) ], limit=1) - if existing_partner: + if existing_partner and not record.parent_id: raise ValidationError(f"Nama '{record.name}' dengan email '{record.email}' sudah digunakan oleh partner lain!") @api.constrains('npwp') |
