Linking HR Organisation Structure to Approval Process in Odoo

There is no direct link between Organization Structure and access rights. In HR Configuration, we define employees of a company. Next, we create user accounts to give employees access to Odoo. We then link Employee to User in Employee form by using the menu Human Resources ‣ Employees.

Employee form
Employee form

Each user is then linked to groups which defines its access rights.

User Access Rights
User Access Rights

Now, we can control approval process using these groups.

For example, in order to allow only sales manager to approve quotations we can give-
<button name="quotation_approved" states="confirmed" type="object" string="Approve" class="oe_highlight" groups="base.group_sale_manager" />

Similarly, we can make fields, groups, page visible only to users of a particular groups by using ‘groups’ attribute
<field name="incoterm" widget="selection" groups="base.group_user"/>
<group name="sales_person" groups="base.group_user">
<page string="Other Information" groups="base.group_user">

So, this way groups can be used to limit access to directors, managers, users, etc. and approval process at various levels can be achieved.

5 thoughts on “Linking HR Organisation Structure to Approval Process in Odoo

  1. JeroenB

    Hi,
    Do you know how to call the id of the employee?

    for example:
    {‘state’: ‘absent’, ‘user_id’: [9, ‘test_user’], ‘id’: 13}

    ‘user_id’ gives the uid and username of the linked user.
    I can call uid via uid = xmlrpclib.ServerProxy(ROOT + ‘common’).login(DB,USER,PASS)

    So how do I have to call the ‘id’ number (here: 13)? Do you have a clue?
    Thanks in advance.

      1. JeroenB

        states = call(‘hr.employee’,’search_read’, [], [‘state’,’user_id’, ‘id’])
        gives the dictionary from the example. But I don’t know where to call the id from. I want to have an analogical way to get ‘id’ like I get ‘uid’.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s