[FIX]pms: fix constrain unique by document type

This commit is contained in:
braisab
2021-06-10 08:33:41 +02:00
committed by Sara Lago
parent 2855b6a439
commit 784e631b9a

View File

@@ -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"))