diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index d1c4dff4cec..d6de1ee50ca 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -79,6 +79,7 @@ class pos_config(osv.osv):
'iface_big_scrollbars': fields.boolean('Large Scrollbars',help='For imprecise industrial touchscreens'),
'iface_fullscreen': fields.boolean('Fullscreen', help='Display the Point of Sale in full screen mode'),
'iface_print_auto': fields.boolean('Automatic Receipt Printing', help='The receipt will automatically be printed at the end of each order'),
+ 'iface_print_skip_screen': fields.boolean('Skip Receipt Screen', help='The receipt screen will be skipped if the receipt can be printed automatically.'),
'iface_precompute_cash': fields.boolean('Prefill Cash Payment', help='The payment input will behave similarily to bank payment input, and will be prefilled with the exact due amount'),
'iface_tax_included': fields.boolean('Include Taxes in Prices', help='The displayed prices will always include all taxes, even if the taxes have been setup differently'),
'iface_start_categ_id': fields.many2one('pos.category','Start Category', help='The point of sale will display this product category by default. If no category is specified, all available products will be shown'),
@@ -201,6 +202,7 @@ class pos_config(osv.osv):
'pricelist_id': _default_pricelist,
'iface_invoicing': True,
'iface_print_auto': True,
+ 'iface_print_skip_screen': True,
'stock_location_id': _get_default_location,
'company_id': _get_default_company,
'barcode_nomenclature_id': _get_default_nomenclature,
@@ -1299,7 +1301,6 @@ class account_bank_statement_line(osv.osv):
'pos_statement_id': fields.many2one('pos.order', string="POS statement", ondelete='cascade'),
}
-
class pos_order_line(osv.osv):
_name = "pos.order.line"
_description = "Lines of Point of Sale"
diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml
index c100d646f55..1b6f970300a 100644
--- a/addons/point_of_sale/point_of_sale_view.xml
+++ b/addons/point_of_sale/point_of_sale_view.xml
@@ -701,12 +701,13 @@
+
-
+
diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js
index 5a910aa48aa..c90d03c5ed6 100644
--- a/addons/point_of_sale/static/src/js/screens.js
+++ b/addons/point_of_sale/static/src/js/screens.js
@@ -1337,14 +1337,20 @@ var ReceiptScreenWidget = ScreenWidget.extend({
if (this.should_auto_print()) {
this.print();
+ if (this.should_close_immediately()){
+ this.click_next();
+ }
} else {
this.lock_screen(false);
}
},
- should_auto_print: function(){
+ should_auto_print: function() {
return this.pos.config.iface_print_auto && !this.pos.get_order()._printed;
},
+ should_close_immediately: function() {
+ return this.pos.config.iface_print_via_proxy && this.pos.config.iface_print_skip_screen;
+ },
lock_screen: function(locked) {
this._locked = locked;
if (locked) {