fix if parent is set

This commit is contained in:
Benoît Vézina 2023-11-01 14:56:59 -04:00
parent bb191fbcc0
commit db8fc59689

View file

@ -8,6 +8,8 @@ class Partner(models.Model):
@api.onchange('email')
def _check_parent_from_email_domain(self):
for rec in self:
if rec.parent_id:
continue
try:
# Split the email address on '@' and get the domain part
if rec.email: