From 8996b2f8281b8e933faeb7e93ee5e4559d7a1294 Mon Sep 17 00:00:00 2001 From: braisab Date: Fri, 25 Jun 2021 19:23:57 +0200 Subject: [PATCH] [FIX]pms: fixed mobile and email fields when there are incongruences with the customer --- pms/models/res_partner.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pms/models/res_partner.py b/pms/models/res_partner.py index c3ed9c46d..6ce4fafc1 100644 --- a/pms/models/res_partner.py +++ b/pms/models/res_partner.py @@ -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 ):