mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX] no checkout search reservations
This commit is contained in:
@@ -193,7 +193,6 @@ class PmsReservation(models.Model):
|
|||||||
compute="_compute_checkin_partner_ids",
|
compute="_compute_checkin_partner_ids",
|
||||||
store=True,
|
store=True,
|
||||||
readonly=False,
|
readonly=False,
|
||||||
ondelete="restrict",
|
|
||||||
)
|
)
|
||||||
count_pending_arrival = fields.Integer(
|
count_pending_arrival = fields.Integer(
|
||||||
"Pending Arrival",
|
"Pending Arrival",
|
||||||
@@ -1368,10 +1367,12 @@ class PmsReservation(models.Model):
|
|||||||
reservations = self.env["pms.reservation"].search(
|
reservations = self.env["pms.reservation"].search(
|
||||||
[
|
[
|
||||||
("state", "in", ("onboard",)),
|
("state", "in", ("onboard",)),
|
||||||
("checkout_datetime", "<=", fields.Datetime.now()),
|
("checkout", "=", fields.Datetime.today()),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
reservations.state = "no_checkout"
|
for reservation in reservations:
|
||||||
|
if reservation.checkout_datetime <= fields.Datetime.now():
|
||||||
|
reservations.state = "no_checkout"
|
||||||
|
|
||||||
def unify(self):
|
def unify(self):
|
||||||
# TODO
|
# TODO
|
||||||
|
|||||||
Reference in New Issue
Block a user