-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Odoo Development Cookbook
By :

Odoo provides inbuilt features to enable archive and unarchive options for records. This will help the user hide records that are no longer important. In this recipe, we will add an archive/unarchive option for a room. We can archive a room once it is not available.
For this recipe, we will be using the my_hostel
module from the previous recipe.
Archive and unarchive mostly work automatically. The options are available on a record if the model has a Boolean field named active
. We already have an active
field in the hostel.room
model. But if you have not added it, follow these steps to add the active
field:
active
Boolean field to the hostel.room
model, like this:active = fields.Boolean(default=True)
active
field to the form view:<field name="active" invisible="1"/>
Update the my_hostel
module to apply the changes. Now, you will be able to archive...