mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] Wubook reservation modified
This commit is contained in:
@@ -866,9 +866,13 @@ class HotelReservation(models.Model):
|
||||
@api.multi
|
||||
def action_cancel(self):
|
||||
for record in self:
|
||||
cancel_reason = 'intime' if self._context.get("no_penalty", False) \
|
||||
else record.compute_cancelation_reason()
|
||||
if self._context.get("no_penalty", False):
|
||||
_logger.info("///MODIFIED RESERVATION - NO PENALTY")
|
||||
record.write({
|
||||
'state': 'cancelled',
|
||||
'cancelled_reason': record.compute_cancelation_reason()
|
||||
'cancelled_reason': cancel_reason
|
||||
})
|
||||
record._compute_cancelled_discount()
|
||||
if record.splitted:
|
||||
|
||||
Reference in New Issue
Block a user