[imp] added print button

bzr revid: nicolas.vanhoren@openerp.com-20111219124547-1vjs6oftrp3zv3ry
This commit is contained in:
niv-openerp 2011-12-19 13:45:47 +01:00
parent 410bff7fb0
commit 8d2f664100
3 changed files with 10 additions and 1 deletions

View File

@ -484,6 +484,10 @@
background-color: #D92A2A;
}
.receipt-buttons {
white-space: nowrap;
}
@media print {
#oe_header, #oe_menu, .point-of-sale #topheader, .point-of-sale #leftpane {
display: none;

View 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();

View File

@ -240,7 +240,11 @@
<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>