Browse Source

[FIX] ajuste

Rodney Elpidio Enciso Arias 6 years ago
parent
commit
3effbb4045
1 changed files with 2 additions and 2 deletions
  1. 2 2
      static/src/js/stock.js

+ 2 - 2
static/src/js/stock.js

@@ -27,7 +27,7 @@ openerp.barcode_stock_inventory = function (instance, local) {
             $("#StockInventoryProductSearch").keypress(function(e) {
                 var product_code = $('#StockInventoryProductSearch').val().trim();
                 var code = (e.keyCode ? e.keyCode : e.which);
-                if(code==13 && product_code.length >= 9){
+                if(code==13 && product_code.length >= 5){
                     self.Initial();
                 }
             });
@@ -90,7 +90,7 @@ openerp.barcode_stock_inventory = function (instance, local) {
         fetchProductProduct: function (product_code) {
             var domain = [
                 ['active','=',true],
-                ['sale_ok','=',true],
+                ['type','=','product'],
                 '|',['ean13','like',product_code],['default_code','like',product_code],
             ];
             var ProductProduct = new model.web.Model('product.product');