summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/res_partner.py
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-08-15 09:10:07 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-08-15 09:10:07 +0700
commit9ea33822721c3c548675633effdf679cc1a99b0d (patch)
tree7aac3bbc6712376354c2c05c03e1acb319a8b335 /indoteknik_custom/models/res_partner.py
parent7644260c8b660c71aa1f9232cb50acea551798c2 (diff)
parent4e1d5fa01a64bc6daa6c7bf7255caa55ccf53c59 (diff)
<hafid> revisi refund system
Diffstat (limited to 'indoteknik_custom/models/res_partner.py')
-rw-r--r--indoteknik_custom/models/res_partner.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/res_partner.py b/indoteknik_custom/models/res_partner.py
index f260f58e..cf9fbea4 100644
--- a/indoteknik_custom/models/res_partner.py
+++ b/indoteknik_custom/models/res_partner.py
@@ -231,7 +231,7 @@ class ResPartner(models.Model):
rec.payment_difficulty = rec.parent_id.payment_difficulty
return records
- @api.constrains('name')
+ @api.constrains('email')
def _check_duplicate_name(self):
for record in self:
if record.name:
@@ -242,7 +242,7 @@ class ResPartner(models.Model):
], limit=1)
if existing_partner:
- raise ValidationError(f"Nama '{record.name}' sudah digunakan oleh partner lain!")
+ raise ValidationError(f"Nama '{record.name}' dengan email '{record.email}' sudah digunakan oleh partner lain!")
@api.constrains('npwp')
def _check_npwp(self):