[FIX] point_of_sale: Print receipt on Safari

As explained on stackoverflow with
https://stackoverflow.com/questions/23626998/safari-print-issue-with-javascript-window-print
There is an issue with javascript window.print() on Safari

Steps to reproduce the bug:
When clicking on button "Print receipt" in the point of sale, nothing happened.

opw:1858205
This commit is contained in:
Goffin Simon
2018-09-03 13:23:21 +02:00
parent b95b4035e4
commit bc913d9d2b
@@ -1547,7 +1547,12 @@ var ReceiptScreenWidget = ScreenWidget.extend({
};
},
print_web: function() {
window.print();
if($.browser.safari){
document.execCommand('print', false, null);
}
else{
window.print();
}
this.pos.get_order()._printed = true;
},
print_xml: function() {