controllers.py 656 B

12345678910111213141516171819202122
  1. # -*- coding: utf-8 -*-
  2. # from odoo import http
  3. # class News(http.Controller):
  4. # @http.route('/news/news', auth='public')
  5. # def index(self, **kw):
  6. # return "Hello, world"
  7. # @http.route('/news/news/objects', auth='public')
  8. # def list(self, **kw):
  9. # return http.request.render('news.listing', {
  10. # 'root': '/news/news',
  11. # 'objects': http.request.env['news.news'].search([]),
  12. # })
  13. # @http.route('/news/news/objects/<model("news.news"):obj>', auth='public')
  14. # def object(self, obj, **kw):
  15. # return http.request.render('news.object', {
  16. # 'object': obj
  17. # })