Files
odoo_source/addons/hr_timesheet
Xavier BOL (xbo) 21d4788a32 [FIX] hr_timesheet: only create task in timesheet views if project set
Before this commit, when the user wants to create a timesheet in the
list or form view of this model, the user can quick create a project and
a task if he wishes. The problem is when the user wants to quick create
a task without defining a project in the form view of timesheet, because
the default_project_id of the task will be false and a task without
project will be created.

This commit checks when the user clicks on the task_id field if the
default_project_id exists in the context and if the default_project_id
is not false, then we allow to the user to quick create a task for this
timesheet, otherwise he can just select a task.

Moreover, the js file is updated to fit with the new syntax.

closes odoo/odoo#69420

X-original-commit: d3693ad15eae23829e5ed6ef6dfa915eeab5c8cc
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-04-16 16:02:56 +00:00
..
2021-01-15 12:20:54 +00:00