mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX]pms: fix constrain unique by document type
This commit is contained in:
@@ -42,5 +42,5 @@ class ResPartnerIdNumber(models.Model):
|
||||
("category_id", "=", record.category_id.id),
|
||||
]
|
||||
)
|
||||
if id_number:
|
||||
if len(id_number) > 1:
|
||||
raise ValidationError(_("Partner already has this document type"))
|
||||
|
||||
Reference in New Issue
Block a user