summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/res_partner.py
diff options
context:
space:
mode:
authorIndoteknik . <it@fixcomart.co.id>2025-08-15 14:04:47 +0700
committerIndoteknik . <it@fixcomart.co.id>2025-08-15 14:04:47 +0700
commitb133092eb4d27174f774d96f0a090670ad694d19 (patch)
tree106326a271941ceded00967784a13352012d95cf /indoteknik_custom/models/res_partner.py
parenta19a78db2e3ff278ef56007629f3d9f5e9c89110 (diff)
parent8dd70f877c68abb3f0331e18f4652acb11e1bf84 (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.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):