Odoo Help

0

How to add archiving functionality to a custom Odoo model

By
Alexander Soare
on 8/12/16, 7:58 AM 745 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?

3

Bejaoui Souheil

--Bejaoui Souheil--
1051
| 2 1 5
Rennes, France
--Bejaoui Souheil--

Odoo developer,  functional and technical consultant

souheil_bejaoui@hotmail.fr

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

Hi,

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.

1

Sudhir Arya (SA)

--Sudhir Arya (SA)--
10560
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow

LinkedIn

Blog

Stackoverflow

Sudhir Arya (SA)
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.

Register

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)

Stats

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