[FIX] stock: barcode interface update qty without pressing enter
This commit is contained in:
parent
3b8e6a43cf
commit
3092f63a28
|
@ -262,7 +262,12 @@ function openerp_picking_widgets(instance){
|
|||
self.getParent().barcode_scanner.disconnect();
|
||||
});
|
||||
this.$('.js_qty').blur(function(){
|
||||
this.value = "";
|
||||
var op_id = $(this).parents("[data-id]:first").data('id');
|
||||
var value = parseFloat($(this).val());
|
||||
if (value>=0){
|
||||
self.getParent().set_operation_quantity(value, op_id);
|
||||
}
|
||||
|
||||
self.getParent().barcode_scanner.connect(function(ean){
|
||||
self.getParent().scan(ean);
|
||||
});
|
||||
|
@ -358,7 +363,7 @@ function openerp_picking_widgets(instance){
|
|||
//get all visible element and if none has positive qty, disable put in pack and process button
|
||||
var self = this;
|
||||
var processed = this.$('.js_pack_op_line.processed');
|
||||
var qties = this.$('.js_pack_op_line:not(.processed):not(.hidden) .js_qty').map(function(){return $(this).attr('placeholder')});
|
||||
var qties = this.$('.js_pack_op_line:not(.processed):not(.hidden) .js_qty').map(function(){return $(this).val()});
|
||||
var container = this.$('.js_pack_op_line.container_head:not(.processed):not(.hidden)')
|
||||
var disabled = true;
|
||||
$.each(qties,function(index, value){
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
<div class="input-group">
|
||||
<span class="input-group-addon js_minus input-sm" t-att-data-product-id='row.cols.product_id'><a href="#"><i class="fa fa-minus"></i></a></span>
|
||||
<form class="js_submit_value">
|
||||
<input type="text" class="form-control text-center js_qty" t-att-placeholder="row.cols.rem"></input>
|
||||
<input type="text" class="form-control text-center js_qty" t-att-value="row.cols.rem"></input>
|
||||
<!-- <input type="submit" class="hidden"></input> -->
|
||||
</form>
|
||||
<span class="input-group-addon js_plus input-sm" t-att-data-product-id='row.cols.product_id'><a href="#"><i class="fa fa-plus"></i></a></span>
|
||||
|
|
Loading…
Reference in New Issue