[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.
This commit is contained in:
celm1990
2018-02-07 11:00:48 +01:00
committed by Pierre Masereel
parent 34d2765faa
commit 80f88ad63b
@@ -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'),