blob: b4aab1b07544b20442e08a33c7a01ec9df627d45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
from .. import controller
from odoo import http
from odoo.http import request
class V3Product(controller.Controller):
prefix = '/api/v3/'
@http.route(prefix + 'product/<id>', 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)
|