So I need to make a Rest service which will call data from an specific model.
In order to do this, I must create a controller.
I'm newbie with Odoo, also with Json, and I can't find anything that could work for this.
Far I have is all I need but in a http request.
class RestService(http.Controller):
@http.route('/orders/<model("sale.order"):order>', auth='none', website=True)
def consulta_orden(self , order):
return request.render('consulta_pedidos.order', {'order': order})
return {'order_id': order_id}
The idea is that when I hace the data loaded, I can render this data in a template. Already did this with an Http request, but I need it with Json. Any tip about how to implement it better.