[FIX] point_of_sale: forgot to remove a ref to the DAO
authorFrédéric van der Essen <fva@openerp.com>
Tue, 14 Aug 2012 15:39:05 +0000 (17:39 +0200)
committerFrédéric van der Essen <fva@openerp.com>
Tue, 14 Aug 2012 15:39:05 +0000 (17:39 +0200)
bzr revid: fva@openerp.com-20120814153905-zlxpitgrhizt68zt

addons/point_of_sale/static/src/js/pos_models.js
addons/point_of_sale/static/src/js/pos_widgets.js

index 2be3043..03219e1 100644 (file)
@@ -20,7 +20,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
             Backbone.Model.prototype.initialize.call(this, attributes);
             var  self = this;
             this.session = session;                 
-            this.dao = new module.LocalStorageDAO();            // used to store the order's data on the Hard Drive
             this.ready = $.Deferred();                          // used to notify the GUI that the PosModel has loaded all resources
             this.flush_mutex = new $.Mutex();                   // used to make sure the orders are sent to the server once at time
 
@@ -266,11 +265,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
         push_order: function(record) {
             this.db.add_order(record);
             this.flush();
-            /*
-            return this.dao.add_operation(record).pipe(function(){
-                return self.flush();
-            });
-            */
         },
 
         //creates a new empty order and sets it as the current order
index 1f6b294..ec8f66d 100644 (file)
@@ -242,7 +242,9 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
             this.renderElement();
         },
         get_image_url: function() {
-            return '/web/binary/image?session_id='+instance.connection.session_id+'&model=product.product&field=image&id='+this.model.get('id');
+            var url = '/web/binary/image?session_id='+instance.connection.session_id+'&model=product.product&field=image&id='+this.model.get('id');
+            console.log('Requesting url:'+ url);
+            return url;
         },
         renderElement: function() {
             this._super();