summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-08-14 10:46:06 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-08-14 10:46:06 +0700
commitdb75081a2afcd369e8a0169f3fe2f080dbad0c4a (patch)
tree0d7def76245c4b0ada76b8bd7034fd0af9add145 /indoteknik_custom/models
parent0d55911725d5c6da84acadd654ce5d050603f6ed (diff)
<Miqdad> Change or edit address website
Diffstat (limited to 'indoteknik_custom/models')
-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):