merge from stw
authorFrédéric van der Essen <fva@openerp.com>
Wed, 9 May 2012 09:46:36 +0000 (11:46 +0200)
committerFrédéric van der Essen <fva@openerp.com>
Wed, 9 May 2012 09:46:36 +0000 (11:46 +0200)
bzr revid: fva@openerp.com-20120509094636-kqlmd9gf6y33ehn1

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

index 0a3fbe9..8311b25 100644 (file)
@@ -17,7 +17,7 @@ function openerp_pos_devices(module, instance){ //module is instance.point_of_sa
 
     module.ProxyDevice  = instance.web.Class.extend({
         //a product has been scanned and recognized with success
-        scan_item_succes: function(){
+        scan_item_success: function(){
             console.log('PROXY: scan item success');
         },
 
@@ -323,16 +323,12 @@ function openerp_pos_devices(module, instance){ //module is instance.point_of_sa
                                 title: "Warning",
                             });
                         }else if(parse_result.type in {'unit':'', 'weight':'', 'price':''}){    //ean is associated to a product
-                            console.log('calling product callback');
                             if(self.action_callback['product']){
-                                console.log('found product callback');
                                 self.action_callback['product'](parse_result);
                             }
                             //this.trigger("codebar",parse_result );
                         }else{
-                            console.log('calling callback:',parse_result.type);
                             if(self.action_callback[parse_result.type]){
-                                console.log('found callback');
                                 self.action_callback[parse_result.type](parse_result);
                             }
                         }
index 54c2cd1..c8aa194 100644 (file)
@@ -284,7 +284,6 @@ function openerp_pos_models(module, instance){ //module is instance.point_of_sal
         },
         initialize: function(attributes) {
             this.pos = attributes.pos;
-            console.log(attributes);
             Backbone.Model.prototype.initialize.apply(this, arguments);
 
             if(attributes.weight){
index e693a6b..f3a576a 100644 (file)
@@ -119,7 +119,6 @@ function openerp_pos_screens(module, instance){ //module is instance.point_of_sa
             if(this.current_mode === 'client'){
                 this.set_current_screen(selectedOrder.get('client_screen') || this.default_client_screen);
             }else if(this.current_mode === 'cashier'){
-                console.log('default_cashier_screen:',this.default_cashier_screen);
                 this.set_current_screen(selectedOrder.get('cashier_screen') || this.default_cashier_screen);
             }
             this.selected_order = selectedOrder;
@@ -228,7 +227,6 @@ function openerp_pos_screens(module, instance){ //module is instance.point_of_sa
 
             this.pos.barcode_reader.save_callbacks();
             this.pos.barcode_reader.reset_action_callbacks();
-            console.log('actionz callbacks zwave been resetses');
             this.pos.barcode_reader.set_action_callbacks({
                 'cashier': function(ean){
                     clearInterval(this.intervalID);
@@ -699,7 +697,6 @@ function openerp_pos_screens(module, instance){ //module is instance.point_of_sa
             return this.$element.find('#paymentlines');
         },
         back: function() {
-            console.log('back');
             this.pos.screen_selector.set_current_screen('products');
         },
         validateCurrentOrder: function() {
index 4bb6ba1..afd755b 100644 (file)
@@ -957,7 +957,7 @@ function openerp_pos_widgets(module, instance){ //module is instance.point_of_sa
         //FIXME this method is probably not at the right place ... 
         scan_product: function(parsed_ean){
             var selectedOrder = this.pos.get('selectedOrder');
-            var scannedProductModel = this.get_product_by_ean(parsed_ean.ean);
+            var scannedProductModel = this.get_product_by_ean(parsed_ean);
             if (!scannedProductModel){
                 return false;
             } else {