[FIX] pms-api-rest: fix precommit

This commit is contained in:
miguelpadin
2022-06-23 19:12:29 +02:00
committed by Darío Lodeiros
parent 7c94f2ae86
commit 4da5273417
4 changed files with 18 additions and 13 deletions

View File

@@ -186,7 +186,8 @@ class PmsAvailabilityPlanService(Component):
[
(
[
"/<int:availability_plan_id>/availability-plan-rules/<int:availability_plan_rule_id>",
"/<int:availability_plan_id>/"
"availability-plan-rules/<int:availability_plan_rule_id>",
],
"PATCH",
)
@@ -202,7 +203,6 @@ class PmsAvailabilityPlanService(Component):
[
("availability_plan_id", "=", availability_plan_id),
("id", "=", availability_plan_rule_id),
]
)
if avail_rule:

View File

@@ -34,12 +34,18 @@ class PmsFolioService(Component):
)
if folio_search_param.date_to and folio_search_param.date_from:
reservation_lines = self.env["pms.reservation.line"].search(
[
("date", ">=", folio_search_param.date_from),
("date", "<", folio_search_param.date_to),
]
).mapped("reservation_id").mapped("folio_id").ids
reservation_lines = (
self.env["pms.reservation.line"]
.search(
[
("date", ">=", folio_search_param.date_from),
("date", "<", folio_search_param.date_to),
]
)
.mapped("reservation_id")
.mapped("folio_id")
.ids
)
domain_fields.append(("folio_id", "in", reservation_lines))
domain_filter = list()
@@ -156,7 +162,7 @@ class PmsFolioService(Component):
else "",
"pendingAmount": reservation.folio_id.pending_amount,
"toAssign": reservation.to_assign,
"reservationType": reservation.reservation_type
"reservationType": reservation.reservation_type,
}
)
result_folios.append(

View File

@@ -183,7 +183,9 @@ class PmsPricelistService(Component):
input_param=Datamodel("pms.pricelist.item.info", is_list=False),
auth="jwt_api_pms",
)
def write_pricelist_item(self, pricelist_id, pricelist_item_id, pms_pricelist_item_info):
def write_pricelist_item(
self, pricelist_id, pricelist_item_id, pms_pricelist_item_info
):
product_pricelist_item = self.env["product.pricelist.item"].search(
[