With the help of accessing data fetch the records from the database instead of having a static list and after that we can search() returns a set of records matching the filter.for example you can see below code and use in .controller.py file in Odoo module.
class Academy(http.Controller):
@http.route('/academy/academy/', auth='public')
def index(self, **kw):
Teachers = http.request.env['academy.teachers']
return http.request.render('academy.index', {
'teachers': Teachers.search([])
})
# @http.route('/academy/academy/objects/', auth='public')
0 Comment(s)