Skip to Content
Menu
This question has been flagged
1 Reply
12131 Views

How does one go about creating another admin user with all the same writes as the first admin user created? Is it enough to just give them top level access to all the various modules, or would there still be items that they would be missing?

Thanks, Nick

Avatar
Discard
Best Answer

Hello. The fast way to create another admin is going to the Admin user. You are going to see a button on the top bar displaying: More>"Duplicate" Just duplicate it and give another username to the duplicate user.

Avatar
Discard

Even then this user will not have all ultimate powers. In the source code I have seen references like: if user.id == 1: do something else: check for rights ....

If there are that kind of code you can't do anything. At the moment I never seen a code showing that. Anyways if there is some code like that you can overwrite the function. I don't think it's reasonable to have a code that just allow some characteristic to the user 1. Anyways you can overwrite it and allow that to another users. Of course you have to overwrite the function creating another module and a inherited class.

Example: the method write of stock.move, in addons/stock/stock.py: if uid != 1: ........

Oooh I see. But as I told you you can overwrite this methods. I see three places that check if the user is the admin. It has sense in the stock part because only the administrator can write the new stocks on the field. Maybe OpenERP thought that the user 1 is going to be always the admin.

But as I told you, you can overwrite that method and move it to your needs. For example if you need that the stock admin can change the stocks then write a new method checking that permission. You have to check that thinking about who can do that and who can't. Anyways OpenERP is really flexible.

Related Posts Replies Views Activity
1
Mar 15
5673
1
Mar 15
5285
3
Mar 15
11651
2
Mar 15
7374
2
Mar 15
5338