From 2317e853cc3950ca3c42e60891fa6072bc155262 Mon Sep 17 00:00:00 2001 From: Darshan Kalola Date: Tue, 1 Dec 2015 15:33:06 +0530 Subject: [PATCH] [FIX] point_of_sale: wait on invoicing to finish before printing receipt After this commit was introduced 4a72a703026942197b62d69f65432b339686232a , When you click on validate with invoicing enabled without customer, the popup for select a customer open and immediately we switch to the receipt screen, that gets rid of popup. In this commit we print the receipt after invoice process done in backend when validate an order with invoicing enabled so that it's work like before. --- addons/point_of_sale/static/src/js/screens.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 08af480eee2..ded5088de26 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -1911,12 +1911,13 @@ var PaymentScreenWidget = ScreenWidget.extend({ invoiced.done(function(){ self.invoicing = false; + self.gui.show_screen('receipt'); }); } else { this.pos.push_order(order); + this.gui.show_screen('receipt'); } - this.gui.show_screen('receipt'); }, }); gui.define_screen({name:'payment', widget: PaymentScreenWidget});