mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD] Folio payment action
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
@@ -199,9 +199,9 @@
|
||||
<span class="fa fa-envelope fa-2x" role="button"
|
||||
title="Send Reservation Email" />
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="col-sm-2 btn_popover_open_payment">
|
||||
<span class="fa fa-money fa-2x" role="button"
|
||||
title="Payments" />
|
||||
title="Folio Payments" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-eq-height mt-10">
|
||||
|
||||
Reference in New Issue
Block a user