diff --git a/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js b/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js index d40470f10..8ea8afd0f 100644 --- a/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js +++ b/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js @@ -420,7 +420,7 @@ var PMSCalendarController = AbstractController.extend({ type: 'ir.actions.act_window', res_model: 'hotel.folio', res_id: ev.data.folio_id, - views: [[false, 'form']] + views: [[false, 'form']], }); }); $reservationPopover.data('bs.popover').tip().find(".btn_popover_open_reservation").on('click', @@ -433,6 +433,26 @@ var PMSCalendarController = AbstractController.extend({ views: [[false, 'form']] }); }); + $reservationPopover.data('bs.popover').tip().find(".btn_popover_open_payment").on('click', + {reservation_id: ev.detail.reservationObj.id}, function(ev){ + _destroy_and_clear_popover_mark(); + var x = self._rpc({ + model: 'hotel.reservation', + method: 'action_pay_folio', + args: [ev.data.reservation_id], + }).then(function (result){ + return self.do_action({ + name: result.name, + view_type: result.view_type, + view_mode: result.view_mode, + type: result.type, + res_model: result.res_model, + views: [[result.view_id, 'form']], + context: result.context, + target: result.target, + }); + }); + }); $reservationPopover.data('bs.popover').tip().find(".btn_popover_close").on('click', function(ev){ _destroy_and_clear_popover_mark(); }); diff --git a/hotel_calendar/static/src/xml/hotel_calendar_templates.xml b/hotel_calendar/static/src/xml/hotel_calendar_templates.xml index 08ac7f40a..ba40ec5f1 100644 --- a/hotel_calendar/static/src/xml/hotel_calendar_templates.xml +++ b/hotel_calendar/static/src/xml/hotel_calendar_templates.xml @@ -199,9 +199,9 @@ -
+
+ title="Folio Payments" />