[IMP] point_of_sale: allow to override auto printing
As show is needed to call super it is impossible to override the function without running into the immediate print. It is possible though that you might need some delay that local CPU has rendered everything on the PoS Ticket before printing...based on this you are able to override the handle_auto_print and add a delay there. Closes #16174
This commit is contained in:
committed by
Martin Trigaux
parent
0942ae9b29
commit
0fd502ed9f
@@ -1404,7 +1404,9 @@ var ReceiptScreenWidget = ScreenWidget.extend({
|
||||
|
||||
this.render_change();
|
||||
this.render_receipt();
|
||||
|
||||
this.handle_auto_print();
|
||||
},
|
||||
handle_auto_print: function() {
|
||||
if (this.should_auto_print()) {
|
||||
this.print();
|
||||
if (this.should_close_immediately()){
|
||||
@@ -1413,7 +1415,6 @@ var ReceiptScreenWidget = ScreenWidget.extend({
|
||||
} else {
|
||||
this.lock_screen(false);
|
||||
}
|
||||
|
||||
},
|
||||
should_auto_print: function() {
|
||||
return this.pos.config.iface_print_auto && !this.pos.get_order()._printed;
|
||||
|
||||
Reference in New Issue
Block a user