mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX] pms: fix depends real avail & fix context param room type (#72)
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user