diff --git a/addons/point_of_sale/static/src/js/devices.js b/addons/point_of_sale/static/src/js/devices.js index 67fde81136a..560b25fa10b 100644 --- a/addons/point_of_sale/static/src/js/devices.js +++ b/addons/point_of_sale/static/src/js/devices.js @@ -108,7 +108,6 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal this.connection.session_id = _.uniqueId('posproxy'); this.test_connection(); window.proxy = this; - }, close: function(){ this.connection.destroy(); diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 4da0823f755..f269c9be348 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -197,7 +197,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal } } self.cashregisters = bankstatements; - console.log('cashregisters',self.cashregisters); }); return loaded; diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index d168bfc5dcd..7860de8b328 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -570,6 +570,14 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa get_product_weight_string: function(){ return (this.weight || 0).toFixed(3) + ' Kg'; }, + get_product_image_url: function(){ + var product = this.get_product(); + if(product){ + return window.location.origin + '/web/binary/image?model=product.product&field=image_medium&id='+product.id; + }else{ + return ""; + } + }, close: function(){ var self = this; this._super(); @@ -930,7 +938,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa if( this.pos.config.iface_cashdrawer && this.pos.get('selectedOrder').get('paymentLines').find( function(pl){ - return pl.cashregister.get('journal').type === 'cash'; + return pl.cashregister.journal.type === 'cash'; })){ this.pos.proxy.open_cashbox(); } diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index 724996e54cb..103ab898cee 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -235,7 +235,7 @@ - +