Add archiving option to archive records

< / / / / / >
Beginner
Framework Website
V12.0
V 12.0
+/- 7 minutes
Written by Yenthe Van Ginneken
(0)

Quick scroll

1. Introduction

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.

This tutorial is exclusive for premium members
Become a member too and read all tutorials, unlimited.

Already a member? login here.