|
@@ -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()
|