[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:
Vicente
2023-05-02 12:06:41 +02:00
committed by Darío Lodeiros
parent a3821a403f
commit 63ac94574f
7 changed files with 397 additions and 14 deletions

View File

@@ -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);
}
}
};