[FIX] pms: fix depends real avail & fix context param room type (#72)

This commit is contained in:
Miguel Padin
2021-04-08 12:45:19 +02:00
committed by GitHub
parent 4cd7042294
commit 738904eff2
2 changed files with 2 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ class PmsRoomType(models.Model):
result = []
for room_type in self:
name = room_type.name
if self._context.get("checkin") and self._context.get("checkin"):
if self._context.get("checkin") and self._context.get("checkout"):
avail = self.env[
"pms.room.type.availability.plan"
].get_count_rooms_available(

View File

@@ -48,7 +48,7 @@ class PmsRoomTypeAvailability(models.Model):
)
]
@api.depends("reservation_line_ids.occupies_availability")
@api.depends("reservation_line_ids", "reservation_line_ids.occupies_availability")
def _compute_real_avail(self):
for record in self:
Rooms = self.env["pms.room"]