While performing the request assignment, we don't  have an opportunity to select the manager of the request author at once. This process includes certain sequence of actions: 

1. Distinguish the author of the request.

2. Find the author of the request in the employee's list.

3. Identify the manager of the request author.

4. Go back to the request.
5. Assign the manager to the request.

To implement this type of assignment, we need to apply the assignment policy. Assignment policy is a set of rules for assigning a responsible person.

Model is a set of fields that describe an object. Each object has its own set of fields and, accordingly, records. Assignment policy allows you to select required user based on the model and use this data for assigning a responsible person manually or by setting up the automatic assignment,


Let's Configure A New Assignment Policy

The assignment policy settings are located on the Rules page. Click Rules from the left menu and select Assignment policies.





To create a policy that links to different fields of different models, you can use several related policies. This way you can get the required record step by step and return its value to the original policy.

Let's divide the creation of this assignment policy on stages and create the necessary related policies one by one.

  1. We need to apply the assignment policy to the athor who created the request. So we create the policy based on the Request model and selecting the field of the author of this request. The field Suther will refer to the object type Contact (res.partner) This policy will call another related policy.
  2. The second related policy will be created based on the Contact model. Here, we are able to select the system user who is linked to this Contact. Select the Users (res.users) field. This policy will call the next one.
  3. The third related policy will be created based on the Users model. Here, we are able to select the user's employee to later identify his manager. Select the Related employees (res.users) field. This policy will call the next one.
  4. Next policy will be created based on the Employee model. Here we will define user employee's manager - the Manager (hr.employee) field. Now we need to create another policy that will select the user that is in the manager field. Let's create another related policy.
  5. The final assignment policy will also be created based on the Employee model. The rule type of this policy is User field and it selects the user that is written in the selected field - User (hr.employee). Since the previous policy that triggering this one applies to the manager field, we will thus get the user who is the manager.




On the assignment policies page, click Create to create a new policy.





To begin, we will create the assignment policy that will choose the author from the selected field of the Request model.

On the form that opens, do the following:

  1. Enter the policy name.
  2. Select the model Request.
  3. To create assignment policy rules, click Rules. This will save the created policy.



  1. On the rules page, click Create to create a new rule and fill out the form.
  2. In the Type field, select Related policy.
  3. In the Field field, select Author (request.request).
  4. In the Related policy field enter the policy name and click Create and Edit.



Next. we will create the assignment policy that will choose the system user from the selected field of the Contact model.

In the open form, let's create a new related policy;

1. Enter the name of the policy.

2. Select the model Contact.

3. To create a new rule, click Rules on the right top of the form.


  1. On the rules page, click Create to create a new rule and fill out the form.
  2. In the Type field, select Related policy.
  3. In the Field field, select User's (res.partner).
  4. In the Related policy field enter the policy name and click Create and Edit.




 Now we will create an assignment policy in which we can select an employee whose manager we chose.

  1. On the policies page, click Create.
  2. Enter the policy name, select the Users model.
  3. Click Rules to create an assignment policy rule.


  1. Click Create to create a rule.
  2. Enter the rule name.
  3. Select the type Related policy.
  4. In the Assign Related Policy Field, select Related employees (res.users).
  5. In the Assign Related Policy field select the previously created policy (in our case - Employee manager).
  6. Because there may be several employees, you need to specify which entry from the field will be selected. To do this, in the Choice type field, select First (the first entry in this field will be selected).
  7. Save the rule.




Now let's create the policy that will get the manager field from the Employee model.

  1. On the policies page, click Create.
  2. Enter the policy name, select the Employee model.
  3. Click Rules to create an assignment policy rule.


  1. Click Create to create the rule.
  2. Enter the rule name.
  3. Select the type Related policy.
  4. In the Assign Related Policy Field, select Manager (hr.employee).
  5. In the Assign Related Policy field, select the previously created policy (in our case - User - employee).




Now will create the assignment policy that will choose the user from the selected field of the Employee model.

On the form that opens, do the following:

  1. Enter the policy name.
  2. Select the model Employee.
  3. To create assignment policy rules, click Rules. This will save the created policy.



  1. On the rules page, click Create to create a new rule and fill out the form.
  2. In the Type field, select User field.
  3. In the Assign User Field field, select User (hr.employee).
  4. Save the rule by clicking Save.





Test the Created Policy

Note. To test this policy, the HR application need to be installed and the structure of the company must be configured. In our case, the request is submitted by the administrator who has a manager configured with the HR app.

To check the assignment policy, click Test on the policy form.




On the form that opens:

  1. In the Policy field, select the created assignment policy (we select Assign the reqest created by author to the manager).
  2. In the Object ID field, select the object on which to test the policy. In our case this is a request that was created by the administrator.
  3. Click Test.

At the bottom of the window, you can see the overall result of testing (the Result Get and Result Convert fields). The result is returned as a dictionary (from python programming language). 



Below you can see an Assign Debug Log. It displays the result of testing each rule of each policy step by step.




When the required policy is created and tested, we can create a Simple request and assign it to the preconfigured policy. 


After saving the request, we can assign it to the user, team or policy. 




As a result,we can see that our request is assigned to the manager of the request author.




Set Up Automatic Assignment

Now let's set up the request type so that at the certain stage the manager is automatically assigned. In our case: set up Request for Incident to automatically assign the manager of the request author.

Make sure that the following module is installed:

  • Generic Request (Actions) - this module allows to perform automatic actions when the request navigate along the route.

Click Requests in the main menu on the left. Then click Configuration -> Types.



Select the type of request where you want to set up automatic assignment.

On the request type form, click Actions. 

On the actions page, click Create and fill out the form:

  1. Enter the action name.
  2. In the Events field, select Request events / Created.
  3. Select the type of action - Assignment.
  4. Click the Assign tab, select the Policy Assign Type. Next to the Assign policy field select the created assignment policy.
  5. Click Save.




Now, when Request for Incident is created by the author, the manager will be automatically assign as a responsible person. 

Let's create a request to check how the configured policy is applied.



After saving the request, it will be automatically assigned to the manager of request author.