[FIX] dev_membership: exclude other contacts from constrain
This commit is contained in:
parent
284cfb440e
commit
a78d5e8128
|
|
@ -187,7 +187,7 @@ class Partner(models.Model):
|
|||
@api.constrains('mobile','is_member')
|
||||
def _check_mobile_required_if_member(self):
|
||||
for record in self:
|
||||
if record.is_member and not record.mobile:
|
||||
if record.is_member and not record.mobile and record.parent_id == False:
|
||||
raise ValidationError(_("Mobile number is required for members."))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue