[FIX] pms_l10n_es: fix issue traveller report & ine (filter property)

This commit is contained in:
miguelpadin
2021-12-16 13:56:08 +01:00
parent ad22f8efab
commit 210fa37dad
6 changed files with 255 additions and 1 deletions

View File

@@ -79,6 +79,7 @@ class TravellerReport(models.TransientModel):
("state", "=", "onboard"),
("arrival", ">=", str(date.today()) + " 0:00:00"),
("arrival", "<=", str(date.today()) + " 23:59:59"),
("pms_property_id", "=", pms_property.id),
]
)
# build the property info record

View File

@@ -505,7 +505,12 @@ class WizardIne(models.TransientModel):
header_tag, "CATEGORIA"
).text = self.pms_property_id.ine_category_id.category
ET.SubElement(header_tag, "HABITACIONES").text = str(
self.env["pms.room"].search_count([("in_ine", "=", True)])
self.env["pms.room"].search_count(
[
("in_ine", "=", True),
("pms_property_id", "=", self.pms_property_id.id),
]
)
)
ET.SubElement(header_tag, "PLAZAS_DISPONIBLES_SIN_SUPLETORIAS").text = str(