[FIX]pms_l10n_es: search only one checkin country reference in INE wizard

This commit is contained in:
Darío Lodeiros
2022-04-03 12:33:25 +02:00
parent 2bd9ca2ff0
commit 2cc8843f7c
2 changed files with 6 additions and 7 deletions

View File

@@ -2333,7 +2333,6 @@ class PmsFolio(models.Model):
"partner_id": record.partner_id.id,
"name": record.document_number,
"category_id": record.document_type.id,
"valid_from": record.document_expedition_date,
}
)

View File

@@ -317,12 +317,12 @@ class WizardIne(models.TransientModel):
# if there are some checkin partners in the same reservation
if chk_part_same_reserv_with_checkin:
# create partner with same country & state
country_other = (
chk_part_same_reserv_with_checkin.partner_id.nationality_id.id
)
state_other = (
chk_part_same_reserv_with_checkin.partner_id.residence_state_id.id
)
country_other = chk_part_same_reserv_with_checkin[
0
].partner_id.nationality_id.id
state_other = chk_part_same_reserv_with_checkin[
0
].partner_id.residence_state_id.id
dummy_partner = self.env["res.partner"].create(
{
"name": "partner1",