[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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user