mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] Multi-Calendar
This commit is contained in:
@@ -68,8 +68,7 @@ var PMSCalendarController = AbstractController.extend({
|
||||
return this.model.update_records(ids, values).then(function(result){
|
||||
// Remove OB Room Row?
|
||||
if (oldReserv.room.overbooking && !newReserv.room.overbooking) {
|
||||
console.log("DISPARA BORRADO!");
|
||||
self._multi_calendar.remove_obroom_row(oldReserv);
|
||||
self._multi_calendar.remove_obroom_row(oldReserv, true);
|
||||
}
|
||||
}).fail(function(err, errev){
|
||||
self._multi_calendar.replace_reservation(newReserv, oldReserv);
|
||||
|
||||
@@ -80,9 +80,13 @@ odoo.define('hotel_calendar.MultiCalendar', function(require) {
|
||||
}
|
||||
},
|
||||
|
||||
remove_obroom_row: function(reserv) {
|
||||
for (var calendar of this._calendars) {
|
||||
calendar.removeOBRoomRow(reserv);
|
||||
remove_obroom_row: function(reserv, only_active_calendar) {
|
||||
if (only_active_calendar) {
|
||||
this.get_active_calendar().removeOBRoomRow(reserv);
|
||||
} else {
|
||||
for (var calendar of this._calendars) {
|
||||
calendar.removeOBRoomRow(reserv);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user