[MERGE] forward port of branch 8.0 up to 491372e
[odoo/odoo.git] / addons / point_of_sale / static / src / js / screens.js
index c38a719..c45f415 100644 (file)
@@ -918,7 +918,10 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
             var self = this;
 
             this.refresh();
-            this.print();
+
+            if (!this.pos.get('selectedOrder')._printed) {
+                this.print();
+            }
 
             // The problem is that in chrome the print() is asynchronous and doesn't
             // execute until all rpc are finished. So it conflicts with the rpc used
@@ -950,6 +953,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
             }
         },
         print: function() {
+            this.pos.get('selectedOrder')._printed = true;
             window.print();
         },
         finish_order: function() {