[imp] added print button
authorniv-openerp <nicolas.vanhoren@openerp.com>
Mon, 19 Dec 2011 12:45:47 +0000 (13:45 +0100)
committerniv-openerp <nicolas.vanhoren@openerp.com>
Mon, 19 Dec 2011 12:45:47 +0000 (13:45 +0100)
bzr revid: nicolas.vanhoren@openerp.com-20111219124547-1vjs6oftrp3zv3ry

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 3d34ff8..4b2ecf5 100644 (file)
     background-color: #D92A2A;
 }
 
+.receipt-buttons {
+       white-space: nowrap;
+}
+
 @media print {
     #oe_header, #oe_menu, .point-of-sale #topheader, .point-of-sale #leftpane {
         display: none;
index 553d7a5..32924ce 100644 (file)
@@ -1005,6 +1005,7 @@ openerp.point_of_sale = function(db) {
         render_element: function() {
             this.$element.html(qweb_template('pos-receipt-view'));
             $('button#pos-finish-order', this.$element).click(_.bind(this.finishOrder, this));
+            $('button#print-the-ticket', this.$element).click(function(){window.print();});
         },
         finishOrder: function() {
             this.shop.get('selectedOrder').destroy();
index 7879bf3..424506f 100644 (file)
             <div class="pos-step-container">
                 <div class="pos-receipt-container">
                 </div>
-                <button id="pos-finish-order">Next Order</button>
+                <div class='receipt-buttons'>
+                       <button id="print-the-ticket">
+                           Print</button>
+                       <button id="pos-finish-order">Next Order</button>
+                </div>
             </div>
         </div>
     </t>