controllers.py 893 B

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