[imp] improvements of order tabs

bzr revid: nicolas.vanhoren@openerp.com-20120103100753-pvyxqxectytez73y
This commit is contained in:
niv-openerp
2012-01-03 11:07:53 +01:00
parent 7e8ef0546e
commit 221dcfc074
3 changed files with 10 additions and 6 deletions
+1 -2
View File
@@ -125,8 +125,7 @@
}
.point-of-sale #neworder-button {
width: 32px;
padding: 1px;
font-size: 23px;
padding: 4px 10px;
}
.point-of-sale #loggedas {
float: right;
+8 -2
View File
@@ -364,6 +364,7 @@ openerp.point_of_sale = function(db) {
step: 'products',
};
Order.prototype.initialize = function() {
this.set({creationDate: new Date});
this.set({
orderLines: new OrderlineCollection
});
@@ -742,7 +743,12 @@ openerp.point_of_sale = function(db) {
setValue: function(val) {
var param = {};
param[this.numpadState.get('mode')] = val;
this.shop.get('selectedOrder').selected.set(param);
var order = this.shop.get('selectedOrder');
if (order.get('orderLines').length !== 0) {
order.selected.set(param);
} else {
this.shop.get('selectedOrder').destroy();
}
},
changeSelectedOrder: function() {
this.currentOrderLines.unbind();
@@ -1077,7 +1083,7 @@ openerp.point_of_sale = function(db) {
this.order.destroy();
},
render_element: function() {
this.$element.html(this.template_fct(this.order.toJSON()));
this.$element.html(this.template_fct({widget:this}));
this.$element.addClass('order-selector-button');
}
});
+1 -2
View File
@@ -231,8 +231,7 @@
<br />
</t>
<t t-name="pos-order-selector-button-template">
<button class="select-order">Order</button>
<button class="close-order">X</button>
<button class="select-order"><t t-esc="widget.order.get('creationDate').toString('t')"/></button>
</t>
<t t-name="pos-receipt-view">
<div id="receipt-screen" class="step-screen" style="display:none">