Parcourir la source

[FIX] modificacion en el filtro de productos

Rodney Elpidio Enciso Arias il y a 6 ans
Parent
commit
7915cbe526
1 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 5 5
      static/src/js/reports/report_stock_athletic.js

+ 5 - 5
static/src/js/reports/report_stock_athletic.js

@@ -324,9 +324,6 @@ function report_stock_athletic(reporting){
                 }));
                 domain.push(['id','in',product_ids]);
             };
-            // if(company && company != 9999999){
-            //     domain.push('|',['company_id','=',parseInt(company)],['company_id','=',false]);
-            // };
             if(category){
                 var category_ids = _.map(_.filter(self.ProductCategory,function (item) {
                     return item.id == category || item.parent_id[0] == category;
@@ -351,10 +348,13 @@ function report_stock_athletic(reporting){
             };
             if(brand && brand != 9999999){
                 domain.push(['product_brand_id','=',parseInt(brand)]);
-            }
+            };
             if(category && category != 9999999){
                 domain.push(['categ_id','in',categ_ids]);
-            }
+            };
+            if(company && company != 9999999){
+                domain.push('|',['company_id','=',parseInt(company)],['company_id','=',false]);
+            };
             var ProductProduct = new model.web.Model('product.product');
             return ProductProduct.call('getProductProductStockAthletic',[domain], {
                 context: new model.web.CompoundContext()