mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] Reservation Drawing
This commit is contained in:
@@ -983,8 +983,7 @@ class HotelReservation(models.Model):
|
||||
date_start_dt = fields.Date.from_string(record.checkin)
|
||||
date_end_dt = fields.Date.from_string(record.checkout)
|
||||
date_diff = abs((date_end_dt - date_start_dt).days)
|
||||
new_start_date_dt = date_start_dt + \
|
||||
timedelta(days=date_diff-nights)
|
||||
new_start_date_dt = date_start_dt + timedelta(days=date_diff-nights)
|
||||
if nights >= date_diff or nights < 1:
|
||||
raise ValidationError(_("Invalid Nights! Max is \
|
||||
'%d'") % (date_diff-1))
|
||||
|
||||
Reference in New Issue
Block a user