[FIX] pms-l10n_es: fix precommit

This commit is contained in:
miguelpadin
2024-12-16 11:16:40 +00:00
parent b72ac423c9
commit ef5cb43716
2 changed files with 5 additions and 4 deletions

View File

@@ -783,7 +783,9 @@ class PmsCheckinPartner(models.Model):
dummy_checkins = reservation.checkin_partner_ids.filtered(
lambda c: c.state == "dummy"
)
if len(reservation.checkin_partner_ids) < (reservation.adults + reservation.children):
if len(reservation.checkin_partner_ids) < (
reservation.adults + reservation.children
):
return super(PmsCheckinPartner, self).create(vals)
if len(dummy_checkins) > 0:
dummy_checkins[0].write(vals)
@@ -822,8 +824,6 @@ class PmsCheckinPartner(models.Model):
"residence_state_id",
"document_country_id",
"document_type",
]
return manual_fields

View File

@@ -96,7 +96,8 @@ class PmsCheckinPartner(models.Model):
"document_country_id",
]
)
# Checkins with age lower than 18 must have a relationship with another checkin partner
# Checkins with age lower than 18 must have a relationship with
# another checkin partner
if birthdate_date > fields.Date.today() - relativedelta(years=18):
mandatory_fields.extend(
[