fix for VAT-Validation, check VAT for duplicate in current company only!

develop
Andreas Osim 2020-09-04 08:33:05 +02:00
parent a1c233b9f2
commit 63e648fad7
1 changed files with 1 additions and 0 deletions

View File

@ -192,6 +192,7 @@ class Partner(models.Model):
continue
partners = self.search([('is_company', '=', True),
('vat', '=', self.vat),
('company_id', '=', self.company_id.id),
('id', '!=', self.id)])
if partners:
raise ValidationError(_("UID-Exists: Es sind bereits folgende Unternehmen mit der selben USt. ID "