from .. import controller from odoo import http from odoo.http import request class V3Product(controller.Controller): prefix = '/api/v3/' @http.route(prefix + 'product/', auth='public', methods=['GET', 'OPTIONS']) @controller.Controller.must_authorized() def get_product_solr_flag(self, **kw): solr_model = request.env['apache.solr'] id = kw.get('id') products = request.env['product.template'].browse(int(id)) result = products.solr_results(detail=True) return self.response(result)