odoo_dev 开发培训作业:图书管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
309B

  1. from odoo import http
  2. class Books(http.Controller):
  3. @http.route('/library/books', auth='user')
  4. def list(self, **kwargs):
  5. Book = http.request.env['library.book']
  6. books = Book.search([])
  7. return http.request.render(
  8. 'library_app.book_list_template', {'books':books})
上海开阖软件有限公司 沪ICP备12045867号-1