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
var self = this;
options = options || {};
url = options.url || 'http://localhost:8069';
+
+ this.pos = parent;
this.weighting = false;
this.debug_weight = 0;
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)
});
}