[IMP]pms: Avoid overwrite hosted name in reservation with agency name

This commit is contained in:
Darío Lodeiros
2022-09-28 11:26:28 +02:00
parent 01707623bd
commit 18590ee873

View File

@@ -2583,7 +2583,7 @@ class PmsFolio(models.Model):
@api.model
def _apply_partner_name(self, record):
if record.partner_id:
if record.partner_id and record.partner_id != record.agency_id:
record.partner_name = record.partner_id.name
elif record.agency_id and not record.partner_name:
# if the customer not is the agency but we dont know the customer's name,