Writing a wizard to guide the user
In the Using abstract models for reusable model features recipe in Chapter 4, Application Models, the models.TransientModel
base class was introduced. This class has a lot in common with normal models, except that the records of transient models are periodically cleaned up in the database, hence the name transient. These are used to create wizards or dialogue boxes, which are filled in the user interface by the users and are generally used to perform actions on the persistent records of the database.
Getting ready
For this recipe, we will use the my_hostel
module from the previous recipes. This recipe will add a new wizard. With this wizard, the user will be assigned the room.
How to do it...
Follow these steps to add a new wizard for updating the assign room and hostel records:
- Add a new transient model to the module with the following definition:
class AssignRoomStudentWizard(models.TransientModel): _name =...