mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]pms: improvemente compute overbooking
This commit is contained in:
@@ -481,6 +481,7 @@ class PmsReservationLine(models.Model):
|
||||
@api.depends("room_id", "state", "is_reselling")
|
||||
def _compute_overbooking(self):
|
||||
for record in self.filtered("room_id"):
|
||||
overbooking = False
|
||||
if record.state != "cancel" and not record.is_reselling:
|
||||
record_id = (
|
||||
record.id
|
||||
@@ -498,9 +499,8 @@ class PmsReservationLine(models.Model):
|
||||
("overbooking", "=", False),
|
||||
]
|
||||
):
|
||||
record.overbooking = True
|
||||
else:
|
||||
record.overbooking = False
|
||||
overbooking = True
|
||||
record.overbooking = overbooking
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
|
||||
Reference in New Issue
Block a user