In website development, often, you need to create forms to take input from the website users (visitors). In this recipe, we will create an HTML form in the page to report issues related to the books.
Getting input from users
Getting ready
For this recipe, we will be using the my_library module from the previous recipe. We will need a new model to store issues submitted by users.
So, before starting this recipe, modify the previous code. Add a field in the library.book model and new book.issues model, as follows:
class LibraryBook(models.Model):
_name = 'library.book'
name = fields.Char('Title', required=True)
date_release = fields.Date('Release Date')
author_ids = fields.Many2many...