From 5f69244e7542329c4bce0fc99ea1e46612a150d9 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Mon, 16 Apr 2012 18:56:30 +0200 Subject: [PATCH] wip bzr revid: nicolas.vanhoren@openerp.com-20120416165630-sk808rmb31ztjqsf --- addons/point_of_sale/static/src/js/pos.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/addons/point_of_sale/static/src/js/pos.js b/addons/point_of_sale/static/src/js/pos.js index d99ffbafcee..953ef32ca44 100644 --- a/addons/point_of_sale/static/src/js/pos.js +++ b/addons/point_of_sale/static/src/js/pos.js @@ -59,6 +59,13 @@ openerp.point_of_sale = function(db) { }, }); + var DAOInterface = { + + }; + var LocalStorageDAO = db.web.Class.extend({ + + }); + var fetch = function(osvModel, fields, domain) { var dataSetSearch; dataSetSearch = new db.web.DataSetSearch(null, osvModel, {}, domain); @@ -76,21 +83,12 @@ openerp.point_of_sale = function(db) { this.flush_mutex = new $.Mutex(); this.build_tree = _.bind(this.build_tree, this); this.session = session; - var attributes = { - 'pending_operations': [], + this.set({'pending_operations': [], 'currency': {symbol: '$', position: 'after'}, 'shop': {}, 'company': {}, - 'user': {}, - }; - _.each(attributes, _.bind(function(def, attr) { - var to_set = {}; - to_set[attr] = this.store.get(attr, def); - this.set(to_set); - this.bind('change:' + attr, _.bind(function(unused, val) { - this.store.set(attr, val); - }, this)); - }, this)); + 'user': {}}); + var self = this; var cat_def = fetch('pos.category', ['name', 'parent_id', 'child_id']).pipe(function(result) { return self.store.set('pos.category', result);