From 2e0bb35d3e50d8401c2c8c8b408747d9ea00f747 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Mon, 7 Nov 2011 18:34:17 +0100 Subject: [PATCH] [fix] problem with "orders", showed multiple ones when closing and reopening pos bzr revid: nicolas.vanhoren@openerp.com-20111107173417-6fqs4ddsnp1wn0gp --- addons/point_of_sale/static/src/js/pos.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/point_of_sale/static/src/js/pos.js b/addons/point_of_sale/static/src/js/pos.js index 5835f1e35e1..59c13e0553c 100644 --- a/addons/point_of_sale/static/src/js/pos.js +++ b/addons/point_of_sale/static/src/js/pos.js @@ -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);