Files
odoo_source/addons/hr_timesheet
Pratik Awasthi a95a848e06 [FIX] hr_timesheet: fix traceback on task search in portal view
Before this commit, when the portal user is in `/my/tasks` route
and he remove the groupby and search a certain task name and no
task is found with his search, a traceback is occurred saying `task`
is not found to be able to evaluate the following lines:
```xml
                <t t-set="timesheet_ids" t-value="task.sudo().timesheet_ids"/>
                <t t-set="is_uom_day" t-value="timesheet_ids._is_timesheet_encode_uom_day()"/>```
in the portal template.

This commit fixes the issue by changing the xpath to be sure the task
variable is defined before evaluating task.sudo().timesheet_ids.
Moreover, this commit checks if there is any task in tasks before
displaying tbody to avoid having any scrollbar for nothing.

task-2987387

X-original-commit: 9d0b770aebaf3c9c08352bf11fb9fdf2a36f1523
Part-of: odoo/odoo#104259
2022-10-28 00:50:40 +02:00
..
2022-09-20 12:36:01 +02:00
2022-10-06 14:56:52 +02:00