[FIX]pms: fixed mobile and email fields when there are incongruences with the customer

This commit is contained in:
braisab
2021-06-25 19:23:57 +02:00
parent b592e6cda8
commit 8996b2f828

View File

@@ -184,9 +184,8 @@ class ResPartner(models.Model):
if hasattr(super(), "_compute_email"):
super()._compute_field()
for record in self:
if (
not record.email
and record.pms_checkin_partner_ids
if not record.email and (
record.pms_checkin_partner_ids
or record.pms_reservation_ids
or record.pms_folio_ids
):
@@ -219,9 +218,8 @@ class ResPartner(models.Model):
if hasattr(super(), "_compute_mobile"):
super()._compute_field()
for record in self:
if (
not record.mobile
and record.pms_checkin_partner_ids
if not record.mobile and (
record.pms_checkin_partner_ids
or record.pms_reservation_ids
or record.pms_folio_ids
):