From 80f88ad63b81c1f56aa22251abbfdbbd7d4ebe63 Mon Sep 17 00:00:00 2001 From: celm1990 Date: Mon, 15 Jan 2018 18:18:41 -0500 Subject: [PATCH] [FIX] point_of_sale: unmark order finalized when invoice failed When we validate an order that need to be invoiced, and the customer is not set, you have to enter a customer, but your order is finalized so you have a traceback saying it cannot be modified when you try to set the customer. When the invoicing fails, we don't set the order as finalized. --- addons/point_of_sale/static/src/js/screens.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 726231a9258..140675e0b16 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -1916,6 +1916,7 @@ var PaymentScreenWidget = ScreenWidget.extend({ invoiced.fail(function(error){ self.invoicing = false; + order.finalized = false; if (error.message === 'Missing Customer') { self.gui.show_popup('confirm',{ 'title': _t('Please select the Customer'),