[FIX] hr_recruitment: set view priority

The view `hr_job_search_view` needs an xpath anchor set on the view
`view_job_filter_recruitment`. Since both views have default priority
the order they are applied depends on their ID. In a normal install
process the views are created in the right order, but there are cases
where the IDs are not on the right order.

Steps to reproduce:
1. Install hr_recruitment in 15.0
2. Remove the view pointed by view_job_filter_recruitment
3. Update to 16.0

We get an error:
```
ValueError: Element '<xpath expr="//filter[@name=&#39;my_favorite_jobs&#39;]">' cannot be located in parent view
```

closes odoo/odoo#111140

X-original-commit: 1e77fabfa087fbeedab974645646bc1761c07468
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Alvaro Fuentes Suarez (afu) <afu@odoo.com>
This commit is contained in:
Alvaro Fuentes
2023-01-26 19:56:10 +01:00
parent 7781d94cf9
commit f385cd62de
@@ -242,6 +242,7 @@
<field name="name">hr.job.search</field>
<field name="model">hr.job</field>
<field name="inherit_id" ref="hr.view_job_filter" />
<field name="priority">20</field>
<field name="arch" type="xml">
<xpath expr="//filter[@name='my_favorite_jobs']" position="after">
<filter string="My Job Positions" name="my_positions" domain="[('user_id', '=', uid)]"/>