4

What is the difference between these two in odoo security file.

<field name="users" eval="[(4, ref('base.user_root'))]"/>
<field name="implied_ids" eval="[(4, ref('base.group_hr_manager'))]"/>

Please anyone explain this!!

KbiR
  • 4,047
  • 6
  • 37
  • 103

1 Answers1

8
  1. users are the group members which will get all the group privileges. The model behind is res.users. Example: Users in the group sales manager will see the sales configuration menu.

  2. implied_ids are inherited group privileges. A group which inherits other groups, will get all the other groups rights in top of their own. The model behind is res.groups. Example: The group sales manager will inherit all rights from group see all leads which also implies the rights from group see own leads.

CZoellner
  • 13,553
  • 3
  • 25
  • 38
  • it is an old question, but what does "4" stands for in `implied_ids` ? – Bashir Apr 28 '21 at 16:26
  • 1
    It's one of the relational field write operations. It literally means "add (4) the following ID to the relation". The following ID in this example is produced/got by the `ref` function, which gets a external ID or XML ID and replaces that by an actual database ID. Other write operations are 3 or 6 (or many2many fields), which look like `[(3, ID)]` and `[(6, 0, List_of_IDs)]`. They read like "remove (3) the relation to ID, but dont delete the row of ID" (look into 2, it would delete it) and "replace all relations (6) with new relations to List_of_IDs". – CZoellner Apr 28 '21 at 17:02