Skip to content
Snippets Groups Projects

Feature/add constrain to spa

Merged emanuel buzey requested to merge feature/add-constrain-to-spa into dev
1 unresolved thread
@@ -43,7 +43,7 @@ class SupplyPointAssignation(models.Model):
raise ValidationError(_("Coefficient can't be negative."))
@api.constrains("owner_id")
def constraint_coefficient(self):
def constraint_owner_id(self):
for record in self:
if record.owner_id and not record.owner_id.member:
raise ValidationError(_("The selected partner is not a member"))
Loading