X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=addons%2Fstock%2Fstatic%2Fsrc%2Fjs%2Fwidgets.js;fp=addons%2Fstock%2Fstatic%2Fsrc%2Fjs%2Fwidgets.js;h=6008fc6723d9c6828130047be662961e6bad8fab;hb=fcd06145dda957a83e687fd033ff294c407da5f4;hp=f9b1b48f79947989d14a0b5f9bc4389a3702ca3d;hpb=d9610efd979c974e540353716f8d0b9ecdb9d952;p=odoo%2Fodoo.git diff --git a/addons/stock/static/src/js/widgets.js b/addons/stock/static/src/js/widgets.js index f9b1b48..6008fc6 100644 --- a/addons/stock/static/src/js/widgets.js +++ b/addons/stock/static/src/js/widgets.js @@ -174,12 +174,12 @@ function openerp_picking_widgets(instance){ this.$('.js_plus').click(function(){ var id = $(this).data('product-id'); var op_id = $(this).parents("[data-id]:first").data('id'); - self.getParent().scan_product_id(id,true,op_id); + self.getParent().scan_product_id(id,1,op_id); }); this.$('.js_minus').click(function(){ var id = $(this).data('product-id'); var op_id = $(this).parents("[data-id]:first").data('id'); - self.getParent().scan_product_id(id,false,op_id); + self.getParent().scan_product_id(id,-1,op_id); }); this.$('.js_unfold').click(function(){ var op_id = $(this).parent().data('id'); @@ -362,7 +362,7 @@ function openerp_picking_widgets(instance){ var container = this.$('.js_pack_op_line.container_head:not(.processed):not(.hidden)') var disabled = true; $.each(qties,function(index, value){ - if (parseInt(value)>0){ + if(value>0) { disabled = false; } }); @@ -859,7 +859,7 @@ function openerp_picking_widgets(instance){ } }); }, - scan_product_id: function(product_id,increment,op_id){ //performs the same operation as a scan, but with product id instead + scan_product_id: function(product_id,increment,op_id){ //performs the same operation as a scan, but with product id instead, increment is the value to increment (-1 or 1) var self = this; return new instance.web.Model('stock.picking') .call('process_product_id_from_ui', [self.picking.id, product_id, op_id, increment])