[fix] problem with "orders", showed multiple ones when closing and reopening pos

bzr revid: nicolas.vanhoren@openerp.com-20111107173417-6fqs4ddsnp1wn0gp
This commit is contained in:
niv-openerp
2011-11-07 18:34:17 +01:00
parent db36bc97b4
commit 2e0bb35d3e
+5 -5
View File
@@ -421,11 +421,11 @@ openerp.point_of_sale = function(db) {
Shop.__super__.constructor.apply(this, arguments);
}
Shop.prototype.defaults = {
orders: new OrderCollection,
products: new ProductCollection
};
Shop.prototype.initialize = function() {
this.set({
orders: new OrderCollection(),
products: new ProductCollection()
});
this.set({
cashRegisters: new CashRegisterCollection(pos.store.get('account.bank.statement')),
});
@@ -1201,7 +1201,7 @@ openerp.point_of_sale = function(db) {
});
if (pos)
throw "It is not possible to instantiate multiple instances"+
throw "It is not possible to instantiate multiple instances "+
"of the point of sale at the same time.";
pos = new Pos(this.session);