[IMP] point_of_sale: allow to change the customer from the payment screen
authorFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>
Tue, 30 Sep 2014 19:17:08 +0000 (21:17 +0200)
committerFrédéric van der Essen <fvdessen@gmail.com>
Tue, 25 Nov 2014 18:14:41 +0000 (19:14 +0100)
addons/point_of_sale/static/src/js/screens.js
addons/point_of_sale/static/src/xml/pos.xml

index 813af8d..9537bfa 100644 (file)
@@ -1208,6 +1208,9 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
                 this.$('.js_invoice').removeClass('highlight');
             }
         },
+        click_set_customer: function(){
+            this.pos_widget.screen_selector.set_current_screen('clientlist');
+        },
         renderElement: function() {
             var self = this;
             this._super();
@@ -1228,6 +1231,9 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
                 self.validate_order();
             });
 
+            this.$('.js_set_customer').click(function(){
+                self.click_set_customer();
+            });
             this.$('.js_invoice').click(function(){
                 self.click_invoice();
             });
index 4b310d9..c766a7a 100644 (file)
     <t t-name="ActionpadWidget">
         <div class="actionpad">
             <button class='button set-customer'>
-                <i class='fa fa-user' /> Set Customer
+                <i class='fa fa-user' /> Customer
             </button>
             <button class='button pay'>
                 <i class='fa fa-chevron-right' /> Payment
                     </section>
 
                     <div class='payment-buttons'>
+                        <div class='button js_set_customer'>
+                            <i class='fa fa-user' />Customer
+                        </div>
                         <t t-if='widget.pos.config.iface_invoicing'>
                             <t t-if='widget.pos.get_order()'>
                                 <div t-attf-class='button js_invoice #{ widget.pos.get_order().is_to_invoice() ? "highlight" : ""} '>