mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] pos_pms_link:
- Add translation. - Add improved search. - Add note to pos.order.line with reservation and room. - Add room to list. - Add new domain. - Add reservation confirm popup. - Add hides reservation payment button if there is payment lines in the order.
This commit is contained in:
@@ -15,17 +15,25 @@ odoo.define('pos_pms_link.PaymentScreen', function (require) {
|
||||
if (confirmed) {
|
||||
var self = this;
|
||||
|
||||
var payment_method = {
|
||||
'id': self.env.pos.config.pay_on_reservation_method_id[0],
|
||||
'name': self.env.pos.config.pay_on_reservation_method_id[1],
|
||||
'is_cash_count': false,
|
||||
'pos_mercury_config_id': false,
|
||||
'use_payment_terminal': false,
|
||||
const { confirmed } = await this.showPopup('ConfirmPopup', {
|
||||
title: this.env._t('Pay order with reservation ?'),
|
||||
body: this.env._t(
|
||||
'This operation will add all the products in the order to the reservation. RESERVATION: ' + newReservation['name'] + ' PARTNER : ' + newReservation['partner_name'] + ' ROOM: ' + newReservation['rooms']
|
||||
),
|
||||
});
|
||||
if (confirmed) {
|
||||
var payment_method = {
|
||||
'id': self.env.pos.config.pay_on_reservation_method_id[0],
|
||||
'name': self.env.pos.config.pay_on_reservation_method_id[1],
|
||||
'is_cash_count': false,
|
||||
'pos_mercury_config_id': false,
|
||||
'use_payment_terminal': false,
|
||||
}
|
||||
self.trigger('new-payment-line', payment_method);
|
||||
this.currentOrder.set_paid_on_reservation(true);
|
||||
this.currentOrder.set_pms_reservation_id(newReservation['id']);
|
||||
self.validateOrder(false);
|
||||
}
|
||||
self.trigger('new-payment-line', payment_method);
|
||||
this.currentOrder.set_paid_on_reservation(true);
|
||||
this.currentOrder.set_pms_reservation_id(newReservation['id']);
|
||||
self.validateOrder(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user