I want a sample code for loading the data from odoo to a front end website. For example I want to load the customer name in front end website in Odoo 8.
request.env['res.partner'].sudo().search([('customer','=',True)])
Render the result on the template
class MyController(http.Controller):
@http.route('/my/customers/', auth='public')
def my_customers(self, **kw):
customers = request.env['res.partner'].sudo().search([('customer','=',True)])
return http.request.render('mymodule.customerlist', {
'customers': customers
})
Here
You can also read the list of resources at
Hope it may help in your case.