[FIX] project: fix search view issue in website for milestone in tasks
Before this commit if we go to website and choose tasks and if we search anything it shows no tasks available and if we select milestone it shows table. Steps: - Go to website and select tasks and search anything in search bar. - Showing no tasks available - choose milestone from drop-down and search anything it will show table labels. Fix: - Added condition for checking if milestone is passing empty record set and added another condition to handle it task-3183771 closes odoo/odoo#128204 X-original-commit: bcbfa314fb54039536b07446aa9c925378e68ab0 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
@@ -417,7 +417,8 @@ class ProjectCustomerPortal(CustomerPortal):
|
||||
grouped_tasks = [Task_sudo.concat(*g) for k, g in groupbyelem(tasks_project_allow_milestone, itemgetter(group))]
|
||||
|
||||
if not grouped_tasks:
|
||||
grouped_tasks = [tasks_no_milestone]
|
||||
if tasks_no_milestone:
|
||||
grouped_tasks = [tasks_no_milestone]
|
||||
else:
|
||||
if grouped_tasks[len(grouped_tasks) - 1][0].milestone_id and tasks_no_milestone:
|
||||
grouped_tasks.append(tasks_no_milestone)
|
||||
|
||||
Reference in New Issue
Block a user