From 317cf3b85e6eb15ee74f4e043e47629f2dbf23d1 Mon Sep 17 00:00:00 2001 From: Vincent Larcin Date: Mon, 6 Mar 2023 11:26:33 +0000 Subject: [PATCH] [FIX] project: fix task search views priority Steps to reproduce ------------------ 1. Install and open the Timesheets app. 2. Click on the "Start" button on the top left. 3. Click on "Select a Task" and then on "Search More..." to open the list view. 4. The associated search view is not the same as in the Project app. Explanation ----------- This occurs because the selected search view will be the one related to the model with the lowest priority. Since we didn't define a priority for any of the views, the view `view_task_search_form_base` is the one with the lowest default priority. However, this is a base view created for inheritance purposes and not intended to actually be used anywhere. To solve this issue, this commit adds a very high priority to the base views, and a low priority to the concrete views we want to be used in such cases. Note that this unintended behavior is also present in versions below 16.1, but in a non problematic way (only the project related filters are missing). --- Enterprise: https://github.com/odoo/enterprise/pull/37812 Task-3217905 closes odoo/odoo#117354 X-original-commit: e68bd3490ee609a82c2a0fb0d76c1e2502a2ffc0 Related: odoo/enterprise#39128 Signed-off-by: Xavier Bol (xbo) --- addons/project/views/project_task_views.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/project/views/project_task_views.xml b/addons/project/views/project_task_views.xml index 4e1541ff218..bda9de1b6c2 100644 --- a/addons/project/views/project_task_views.xml +++ b/addons/project/views/project_task_views.xml @@ -4,7 +4,7 @@ project.task.search.form project.task - 100 + 999 @@ -49,7 +49,7 @@ project.task primary - 50 + 999 @@ -72,7 +72,7 @@ project.task primary - 25 + 999 @@ -88,6 +88,7 @@ project.task primary + 10