[FIX]fixed partner_name field when added partner with wizard

This commit is contained in:
braisab
2021-09-15 18:26:55 +02:00
parent 3ac1fa29ec
commit 9d466e7276
2 changed files with 1 additions and 3 deletions

View File

@@ -1767,7 +1767,7 @@ class PmsFolio(models.Model):
@api.model
def _apply_partner_name(self, record):
if record.partner_id and not record.partner_name:
if record.partner_id:
record.partner_name = record.partner_id.name
elif (
record.agency_id
@@ -1874,4 +1874,3 @@ class PmsFolio(models.Model):
}
self.env["res.partner.id_number"].create(number_values)
record.partner_id = partner

View File

@@ -3586,4 +3586,3 @@ class TestPmsReservations(TestPms):
msg="A partner must be added to the reservation",
):
several_partners_wizard.add_partner()