Add archiving option to archive records
A lot of the default models in Odoo have the ability to archive records. This is a common feature that is used in Odoo and you'll most likely want (or need) to have this option on your own model too. Imagine that you have some contacts in your database but they left your company and you no longer want these contacts to show up in your searches. Thanks to the archive option they will no longer be shown but you're still able to activate the record(s) if you'd need them back!
In this tutorial you will learn how to add the archive option to your own model or an existing model. In this example we'll create a new model named 'contact.category' and we will add the option to archive contact categories from the form view.