Odoo Help


A way to give access rights for limited time?

Tomas Parnarauskas
on 7/18/13, 9:56 AM 1,639 views

Hello, Is there a way to give access rights for limited time in OpenERP? You can give let say sales manager rights, but it stays permanently as long as you don't take it a way. Is it possible to give such access rights for set time, for example 1 day and when 1 day passes, such rights will be taken back.

You can make a cron job(Scheduler) of 1 day, and then you can make the user inactive as soon as the day passes. i.e field active=False in res.users

Nishant Kashyap
on 7/18/13, 10:23 AM

Some times that user needs to be active if it works in a company. That user just gets access to some resources for limited time. When that access will be taken away, he will still have his old access were he could previously see other resources.

NOD Baltic, UAB, Tomas Parnarauskas
on 7/19/13, 3:53 AM

Alright, I got your point. Then you can make a boolean fields for that user(res.user form) for the respective records you want him to show, and as soon as the it hits the save button, Two things:1.Make the respective record rule field 'active' = True and 2. Cron job gets activate that will run after 1 day(or whatever time you want) to make record rule field 'active' = False.

Nishant Kashyap
on 7/19/13, 4:14 AM

That would be the case for one user. But if same rule would use different people at the same time. Let say one get access with that rule for one day, another for two. So after one day that rule would become inactive and second user would not have access too. I think this needs to work in assigning/unassinging rule/group level.

NOD Baltic, UAB, Tomas Parnarauskas
on 7/19/13, 4:23 AM

You in the above Question description asked about the single user 'sale manager', otherwise yes you are right you can do the same functionality for the multiple people using group, and you can even add the user the group using python code, rather than doing that manually.I hope it helps you achieving what you want.

Nishant Kashyap
on 7/19/13, 4:27 AM

Thanks for Ideas I think now I'll be on track implementing this feature.

NOD Baltic, UAB, Tomas Parnarauskas
on 7/19/13, 4:41 AM
Nishant Kashyap
On 7/19/13, 4:52 AM

I think its wise to accept the answer if you got what you were looking for Mr.Andrius.

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: 7/18/13, 9:56 AM
Seen: 1639 times
Last updated: 3/16/15, 8:10 AM