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.

19 satır
498B

  1. from odoo import fields,models
  2. class BookReport(models.Model):
  3. _name = 'library.book.report'
  4. _description = 'Book Report'
  5. _auto = False
  6. name = fields.Char('Title')
  7. publisher_id = fields.Many2one('res.partner')
  8. date_published = fields.Date()
  9. def init(self):
  10. self.env.cr.execute("""
  11. Create or Replace View library_book_report as
  12. (
  13. select * from library_book where active=True
  14. )
  15. """)
上海开阖软件有限公司 沪ICP备12045867号-1