[imp] added possibility to go back to products screen
authorniv-openerp <nicolas.vanhoren@openerp.com>
Mon, 9 Jan 2012 16:21:26 +0000 (17:21 +0100)
committerniv-openerp <nicolas.vanhoren@openerp.com>
Mon, 9 Jan 2012 16:21:26 +0000 (17:21 +0100)
bzr revid: nicolas.vanhoren@openerp.com-20120109162126-zq5qphas06jeuf83

addons/point_of_sale/static/src/css/pos.css
addons/point_of_sale/static/src/js/pos.js
addons/point_of_sale/static/src/xml/pos.xml

index 5c5f0ba..75ed054 100644 (file)
        white-space: nowrap;
 }
 
+.pos-payment-buttons {
+    white-space: nowrap;
+}
+
 @media print {
     #oe_header, #oe_menu, .point-of-sale #topheader, .point-of-sale #leftpane {
         display: none;
index 133c646..57678d6 100644 (file)
@@ -985,6 +985,10 @@ openerp.point_of_sale = function(db) {
         },
         start: function() {
             $('button#validate-order', this.$element).click(_.bind(this.validateCurrentOrder, this));
+            $('.oe-back-to-products', this.$element).click(_.bind(this.back, this));
+        },
+        back: function() {
+            this.shop.get('selectedOrder').set({"step": "products"});
         },
         validateCurrentOrder: function() {
             var callback, currentOrder;
index 4728e72..9e975ed 100644 (file)
                             </table>
                         </div>
                         <div class="pos-payment-buttons">
+                            <button class="oe-back-to-products">
+                                <img src="/web/static/src/img/icons/gtk-go-back.png"></img>
+                                Back to Products</button>
                             <button id="validate-order">
                                 <img src="/web/static/src/img/icons/gtk-apply.png"></img>
                                 Validate</button>