mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX] pms-l10n_es: fix precommit
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user