[FIX] point_of_sale: weighting end signal could fail to emit in debug mode
authorFrédéric van der Essen <fva@openerp.com>
Mon, 8 Jul 2013 12:49:12 +0000 (14:49 +0200)
committerFrédéric van der Essen <fva@openerp.com>
Mon, 8 Jul 2013 12:49:12 +0000 (14:49 +0200)
bzr revid: fva@openerp.com-20130708124912-0t8l8v13ug3hst7m

addons/point_of_sale/static/src/js/devices.js
addons/point_of_sale/static/src/js/screens.js

index e7d0376..fe16b2d 100644 (file)
@@ -118,8 +118,8 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
         },
 
         // the client has finished weighting products
-        weighting_end: function(){
-            if(!this.bypass_proxy){
+        weighting_end: function(force){
+            if(!this.bypass_proxy || force){
                 this.weight = 0;
                 this.weighting = false;
                 this.message('weighting_end');
index 7a01732..2873304 100644 (file)
@@ -527,6 +527,8 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
         },
         order_product: function(){
             var weight = this.pos.proxy.weighting_read_kg();
+            console.log('weighting_end');
+            this.pos.proxy.weighting_end('true');
             this.pos.get('selectedOrder').addProduct(this.get_product(),{ quantity:weight });
         },
         get_product_name: function(){