-
- Downloads
[FIX] hr_timesheet: fix task_id field records when creating a timesheet
To reproduce the issue, follow these steps:
1. Install the Timesheet and Project.
2. From the settings menu, create a new company.
3. Create a project using the newly created company(e.g. New Company) and add
a task to it.
4. Open the Timesheet application and create a new timesheet.
5. In the timesheet, select the project created in step 3, and observe that the
dropdown for tasks does not display any task.
Cause for this issue:
-The timesheet application has a domain set for the task field where the company
associated with the task_id should be the same as the company selected in the
current environment.
-However, when a new project is created with a 'New Company', the tasks
associated with it also have the 'New Company' assigned to them. On the other
hand, the current environment has a default company called 'Your Company'
associated with it.
-Therefore, due to this domain setting, the task field does
not display any tasks since there are no tasks associated with the
'Your Company' in the current environment.
Fix:
Since the cause of the issue is related to the company domain set in the task
field, we can solve it by removing it from the domain.
task-3323027
closes odoo/odoo#122631
Signed-off-by:
Xavier Bol (xbo) <xbo@odoo.com>