fix if parent is set
This commit is contained in:
parent
bb191fbcc0
commit
db8fc59689
1 changed files with 2 additions and 0 deletions
|
|
@ -8,6 +8,8 @@ class Partner(models.Model):
|
||||||
@api.onchange('email')
|
@api.onchange('email')
|
||||||
def _check_parent_from_email_domain(self):
|
def _check_parent_from_email_domain(self):
|
||||||
for rec in self:
|
for rec in self:
|
||||||
|
if rec.parent_id:
|
||||||
|
continue
|
||||||
try:
|
try:
|
||||||
# Split the email address on '@' and get the domain part
|
# Split the email address on '@' and get the domain part
|
||||||
if rec.email:
|
if rec.email:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue