[IMP] point_of_sale: let the cashier directly select the invoice's customer instead...
authorFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>
Mon, 11 Aug 2014 09:21:11 +0000 (11:21 +0200)
committerFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>
Mon, 11 Aug 2014 09:21:11 +0000 (11:21 +0200)
addons/point_of_sale/static/src/js/screens.js
addons/point_of_sale/static/src/js/widgets.js
addons/point_of_sale/static/src/xml/pos.xml

index d0c9e28..d4a20d1 100644 (file)
@@ -431,10 +431,6 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
         },
     });
 
-    module.ErrorNoClientPopupWidget = module.ErrorPopupWidget.extend({
-        template: 'ErrorNoClientPopupWidget',
-    });
-
     module.ErrorInvoiceTransferPopupWidget = module.ErrorPopupWidget.extend({
         template: 'ErrorInvoiceTransferPopupWidget',
     });
@@ -1111,7 +1107,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
                 invoiced.fail(function(error){
                     self.invoicing = false;
                     if (error === 'error-no-client') {
-                        self.pos_widget.screen_selector.show_popup('error-no-client');
+                        self.pos_widget.screen_selector.set_current_screen('clientlist');
                     } else {
                         self.pos_widget.screen_selector.show_popup('error-invoice-transfer');
                     }
index c594387..33b421b 100644 (file)
@@ -1091,9 +1091,6 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
             this.choose_receipt_popup = new module.ChooseReceiptPopupWidget(this, {});
             this.choose_receipt_popup.appendTo(this.$el);
 
-            this.error_no_client_popup = new module.ErrorNoClientPopupWidget(this, {});
-            this.error_no_client_popup.appendTo(this.$el);
-
             this.error_invoice_transfer_popup = new module.ErrorInvoiceTransferPopupWidget(this, {});
             this.error_invoice_transfer_popup.appendTo(this.$el);
 
@@ -1161,7 +1158,6 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
                     'error-barcode': this.error_barcode_popup,
                     'error-session': this.error_session_popup,
                     'choose-receipt': this.choose_receipt_popup,
-                    'error-no-client': this.error_no_client_popup,
                     'error-invoice-transfer': this.error_invoice_transfer_popup,
                     'error-traceback': this.error_traceback_popup,
                     'confirm': this.confirm_popup,
index c0fef76..284ac78 100644 (file)
         </div>
     </t>
 
-    <t t-name="ErrorNoClientPopupWidget">
-        <div class="modal-dialog">
-            <div class="popup popup-noclient">
-                <p class="message">An anonymous order cannot be invoiced</p>
-                <div class="footer">
-                    <div class="button">
-                        Ok
-                    </div>
-                </div>
-            </div>
-        </div>
-    </t>
-
     <t t-name="ErrorInvoiceTransferPopupWidget">
         <div class="modal-dialog">
             <div class="popup popup-invoice">