Skip to content
Snippets Groups Projects
Commit 7cf5f0a8 authored by Frédéric van der Essen's avatar Frédéric van der Essen
Browse files

[FIX] point_of_sale: display an error when trying to print a receipt on an outdated posbox

parent ef5b078b
No related branches found
No related tags found
No related merge requests found
function openerp_pos_devices(instance,module){ //module is instance.point_of_sale
var _t = instance.web._t;
// the JobQueue schedules a sequence of 'jobs'. each job is
// a function returning a deferred. the queue waits for each job to finish
......@@ -88,6 +89,8 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
var self = this;
options = options || {};
url = options.url || 'http://localhost:8069';
this.pos = parent;
this.weighting = false;
this.debug_weight = 0;
......@@ -410,7 +413,14 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
self.message('print_xml_receipt',{ receipt: r },{ timeout: 5000 })
.then(function(){
send_printing_job();
},function(){
},function(error){
if (error) {
self.pos.pos_widget.screen_selector.show_popup('error',{
'message': _t('PosBox Printing Error'),
'comment': _t("The receipt could not be printed. The software installed on the posbox is probably out of date. Please refer to the software instructions in the posbox manual or contact the customer support"),
});
return;
}
self.receipt_queue.unshift(r)
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment