Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] project_timesheet_holidays: enable selection of project in time…
… off type Curently when trying to select an existing/newly created project in the timesheet section of time off types, it will not recognise that the project exists and will suggest to create it. Steps to reproduce: ------------------- * Go to **Setting** -> Enable timesheets * Go to **Time Off** App -> Configuration -> Time off types * Create new type * Go to **Project** App * Create a new project * Go back to the configuration of the new time off type * Enable **developer mode** * Under timesheet section, select project * Try selection the new project created * It suggests to create the project/does not recognise it is already created. Why the fix: ------------ In multi-company this issue can be handled by going into the settings of the project and selecting the same company as the one in the time off type. This issue is more problematic in case of single company because the field `company_id` is not available in neither the project form nor the time of type. As of currently, the `company_id` on time off type is by default the current company, while it is `False` by default for the project. This PR introduced that behavior: odoo@16a07ed Since the `company_id` can now also be `False`, it makes sense to enlarge the filter domain on the time off type form. With that in place, the field `timesheet_task_id` also requires changes because a task created in a project with no `company_id` will not have a `company_id`. opw-3644265 closes odoo#149620 X-original-commit: 57d5cf3 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com> Signed-off-by: Sarah Bellefroid (sbel) <sbel@odoo.com>
- Loading branch information