|  | @@ -19,6 +19,7 @@ function report_stock_gral (reporting){
 | 
											
												
													
														|  |              'change #current-location': 'fecthSearch',
 |  |              'change #current-location': 'fecthSearch',
 | 
											
												
													
														|  |              'change #current-category' : 'fecthSearch',
 |  |              'change #current-category' : 'fecthSearch',
 | 
											
												
													
														|  |              'change #current-brand' : 'fecthSearch',
 |  |              'change #current-brand' : 'fecthSearch',
 | 
											
												
													
														|  | 
 |  | +            'click-row.bs.table #table ' : 'ckickAnalysisDetail',
 | 
											
												
													
														|  |          },
 |  |          },
 | 
											
												
													
														|  |          init : function(parent){
 |  |          init : function(parent){
 | 
											
												
													
														|  |              this._super(parent);
 |  |              this._super(parent);
 | 
											
										
											
												
													
														|  | @@ -30,6 +31,23 @@ function report_stock_gral (reporting){
 | 
											
												
													
														|  |              table.bootstrapTable({data : self.productProduct});
 |  |              table.bootstrapTable({data : self.productProduct});
 | 
											
												
													
														|  |              self.fecthInitial();
 |  |              self.fecthInitial();
 | 
											
												
													
														|  |          },
 |  |          },
 | 
											
												
													
														|  | 
 |  | +        ckickAnalysisDetail: function(e, row, $element,field){
 | 
											
												
													
														|  | 
 |  | +            console.log(row);
 | 
											
												
													
														|  | 
 |  | +            if (field == 'product'){
 | 
											
												
													
														|  | 
 |  | +                this.do_action({
 | 
											
												
													
														|  | 
 |  | +                    name:"Producto",
 | 
											
												
													
														|  | 
 |  | +                    type: 'ir.actions.act_window',
 | 
											
												
													
														|  | 
 |  | +                    res_model: "product.product",
 | 
											
												
													
														|  | 
 |  | +                    views: [[false,'form']],
 | 
											
												
													
														|  | 
 |  | +                    target: 'new',
 | 
											
												
													
														|  | 
 |  | +                    domain: [['id', '=',row.id ]],
 | 
											
												
													
														|  | 
 |  | +                    context: {},
 | 
											
												
													
														|  | 
 |  | +                    flags: {'form': {'action_buttons': false, 'options': {'mode': 'view'}}},
 | 
											
												
													
														|  | 
 |  | +                    res_id: row.id,
 | 
											
												
													
														|  | 
 |  | +                });
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +            e.stopImmediatePropagation();
 | 
											
												
													
														|  | 
 |  | +        },
 | 
											
												
													
														|  |          fecthInitial: function(){
 |  |          fecthInitial: function(){
 | 
											
												
													
														|  |              var self = this;
 |  |              var self = this;
 | 
											
												
													
														|  |              self.fecthLocation().then(function(stockLocation){
 |  |              self.fecthLocation().then(function(stockLocation){
 | 
											
										
											
												
													
														|  | @@ -256,11 +274,12 @@ function report_stock_gral (reporting){
 | 
											
												
													
														|  |                              quant=itemQuant.shift();
 |  |                              quant=itemQuant.shift();
 | 
											
												
													
														|  |                              valuation = itemProduct.standard_price * cat
 |  |                              valuation = itemProduct.standard_price * cat
 | 
											
												
													
														|  |                              stock.push({
 |  |                              stock.push({
 | 
											
												
													
														|  | -                                    factory_reference : itemProduct.factory_reference,
 |  | 
 | 
											
												
													
														|  | 
 |  | +                                    id : quant.product_id[0], 
 | 
											
												
													
														|  | 
 |  | +                                    factory_reference : self.valorNull(itemProduct.factory_reference),
 | 
											
												
													
														|  |                                      product : quant.product_id[1],
 |  |                                      product : quant.product_id[1],
 | 
											
												
													
														|  |                                      qty : cat,
 |  |                                      qty : cat,
 | 
											
												
													
														|  |                                      brand_id : itemProduct.product_brand_id[0],
 |  |                                      brand_id : itemProduct.product_brand_id[0],
 | 
											
												
													
														|  | -                                    brand : itemProduct.product_brand_id[1],
 |  | 
 | 
											
												
													
														|  | 
 |  | +                                    brand : self.valorNull(itemProduct.product_brand_id[1]),
 | 
											
												
													
														|  |                                      category_id : itemProduct.categ_id[0],
 |  |                                      category_id : itemProduct.categ_id[0],
 | 
											
												
													
														|  |                                      category : itemProduct.categ_id[1],
 |  |                                      category : itemProduct.categ_id[1],
 | 
											
												
													
														|  |                                      standard_price : accounting.formatNumber(itemProduct.standard_price,2, ".", ","),
 |  |                                      standard_price : accounting.formatNumber(itemProduct.standard_price,2, ".", ","),
 | 
											
										
											
												
													
														|  | @@ -411,9 +430,9 @@ function report_stock_gral (reporting){
 | 
											
												
													
														|  |                      factory_reference : {columnWidth: '5px'},
 |  |                      factory_reference : {columnWidth: '5px'},
 | 
											
												
													
														|  |                      product : {columnWidth: '5px'},
 |  |                      product : {columnWidth: '5px'},
 | 
											
												
													
														|  |                      brand : {columnWidth: '5px'},
 |  |                      brand : {columnWidth: '5px'},
 | 
											
												
													
														|  | -                    qty : {align:'center', columnWidth: '3px'},
 |  | 
 | 
											
												
													
														|  | -                    standard_price : {halign:'right',columnWidth: '5px'},
 |  | 
 | 
											
												
													
														|  | -                    valuation : {halign:'right',columnWidth: '8px'},
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    qty : {align:'center', columnWidth: 'auto'},
 | 
											
												
													
														|  | 
 |  | +                    standard_price : {halign:'right',columnWidth: 'auto'},
 | 
											
												
													
														|  | 
 |  | +                    valuation : {halign:'right',columnWidth: 'auto'},
 | 
											
												
													
														|  |                  },
 |  |                  },
 | 
											
												
													
														|  |                  margin: { top: 20, horizontal: 7},
 |  |                  margin: { top: 20, horizontal: 7},
 | 
											
												
													
														|  |  
 |  |  
 |