Odoo Help


How to add archiving functionality to a custom Odoo model

Alexander Soare
on 8/12/16, 7:58 AM 1,326 views

I created a new model in Odoo from scratch and want to add archiving functionality to it like in res.partner for example. As far as I am aware there are some special functions tied to the 'active' field which makes archiving work the way it does. The problem is that I can't add the 'active' field as custom fields need to be prepended with x_

What is a workaround for this?


Bejaoui Souheil

--Bejaoui Souheil--
--Bejaoui Souheil--

Odoo developer,  functional and technical consultant


Bejaoui Souheil
On 8/12/16, 1:58 PM


Fields created directly from the configuration menu must have x_ as initial. So you can't use the 'active' standard functionality if your field is x_active. 

But you can add domain in you menu action {[('x_active','=',True)]} and have the same result.

Best regards.


Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 




Sudhir Arya
ERP Harbor Consulting Services
Sudhir Arya (ERP Harbor Consulting Services)
On 8/12/16, 1:24 PM

Hi Alexander,

You have to develop a module and then add active field.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 8/12/16, 7:58 AM
Seen: 1326 times
Last updated: 9/5/16, 5:21 AM