mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] Kanban checkin view
This commit is contained in:
@@ -160,6 +160,7 @@ class PmsCheckinPartner(models.Model):
|
||||
record.update(vals)
|
||||
if record.reservation_id.state == "confirm":
|
||||
record.reservation_id.state = "onboard"
|
||||
# keep the checkin reservations popup open to checkin reservation hosts
|
||||
if self._context.get("popup"):
|
||||
self.ensure_one()
|
||||
kanban_id = self.env.ref("pms.pms_checkin_partner_kanban_view").id
|
||||
@@ -178,12 +179,10 @@ class PmsCheckinPartner(models.Model):
|
||||
}
|
||||
|
||||
def action_done(self):
|
||||
for record in self:
|
||||
if record.state == "onboard":
|
||||
hour = record._get_departure_hour()
|
||||
vals = {
|
||||
"state": "done",
|
||||
"departure_hour": hour,
|
||||
}
|
||||
record.update(vals)
|
||||
for record in self.filtered(lambda c: c.state == "onboard"):
|
||||
vals = {
|
||||
"state": "done",
|
||||
"arrival": fields.Datetime.now(),
|
||||
}
|
||||
record.update(vals)
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user