[IMP] prompt for cashier intervention when negative or zero price in self-checkout
bzr revid: fva@openerp.com-20121119160900-ks6a0bfuswlipyvu
This commit is contained in:
parent
d4a50fd516
commit
1af48858a5
|
@ -430,6 +430,10 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
|
|||
template:'ErrorSessionPopupWidget',
|
||||
});
|
||||
|
||||
module.ErrorNegativePricePopupWidget = module.ErrorPopupWidget.extend({
|
||||
template:'ErrorNegativePricePopupWidget',
|
||||
});
|
||||
|
||||
module.ScaleInviteScreenWidget = module.ScreenWidget.extend({
|
||||
template:'ScaleInviteScreenWidget',
|
||||
|
||||
|
@ -684,8 +688,12 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
|
|||
console.log("CANCEL_END");
|
||||
return (new $.Deferred()).resolve();
|
||||
}
|
||||
|
||||
this.queue.schedule(this.start);
|
||||
|
||||
if(this.pos.get('selectedOrder').getDueLeft() <= 0){
|
||||
this.pos_widget.screen_selector.show_popup('error-negative-price');
|
||||
}else{
|
||||
this.queue.schedule(this.start);
|
||||
}
|
||||
|
||||
this.add_action_button({
|
||||
label: 'back',
|
||||
|
|
|
@ -904,6 +904,9 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
|
|||
this.choose_receipt_popup = new module.ChooseReceiptPopupWidget(this, {});
|
||||
this.choose_receipt_popup.appendTo($('.point-of-sale'));
|
||||
|
||||
this.error_negative_price_popup = new module.ErrorNegativePricePopupWidget(this, {});
|
||||
this.error_negative_price_popup.appendTo($('.point-of-sale'));
|
||||
|
||||
// -------- Misc ---------
|
||||
|
||||
this.notification = new module.SynchNotificationWidget(this,{});
|
||||
|
@ -963,6 +966,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
|
|||
'error': this.error_popup,
|
||||
'error-product': this.error_product_popup,
|
||||
'error-session': this.error_session_popup,
|
||||
'error-negative-price': this.error_negative_price_popup,
|
||||
'choose-receipt': this.choose_receipt_popup,
|
||||
},
|
||||
default_client_screen: 'welcome',
|
||||
|
|
|
@ -351,6 +351,14 @@
|
|||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="ErrorNegativePricePopupWidget">
|
||||
<div class="modal-dialog">
|
||||
<div class="popup popup-help">
|
||||
<p class="message">Your order has to be validated by a cashier.</p>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="ErrorPopupWidget">
|
||||
<div class="modal-dialog">
|
||||
<div class="popup popup-help">
|
||||
|
|
Loading…
Reference in New Issue