Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Accessing data in Odoo-9

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 539
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: