You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							11 lines
						
					
					
						
							453 B
						
					
					
				
			
		
		
		
			
			
			
		
		
	
	
							11 lines
						
					
					
						
							453 B
						
					
					
				
								from odoo import http
							 | 
						|
								from odoo.http import request
							 | 
						|
								
							 | 
						|
								
							 | 
						|
								class HideVariants(http.Controller):
							 | 
						|
								    """Controller for setting routes.Pass all categories and
							 | 
						|
								    category wise products as array to a template"""
							 | 
						|
								
							 | 
						|
								    @http.route('/variants/<int:tmpl_id>', type='json', auth='public',website=True, csrf=False)
							 | 
						|
								    def fetch_product_website_hide_variants(self, tmpl_id):
							 | 
						|
								        return request.env['product.product'].sudo().browse(tmpl_id).website_hide_variants
							 | 
						|
								
							 |