|
|
@ -17,7 +17,8 @@ class ResPartner(models.Model): |
|
|
|
|
|
|
|
@api.constrains('industry_id', 'secondary_industry_ids') |
|
|
|
def _check_industries(self): |
|
|
|
if self.industry_id in self.secondary_industry_ids: |
|
|
|
for partner in self: |
|
|
|
if partner.industry_id in partner.secondary_industry_ids: |
|
|
|
raise exceptions.ValidationError( |
|
|
|
_('The main industry must be different ' |
|
|
|
'from the secondary industries.')) |