Steps to reproduce:
- Create an SO for a prepaid service in company A and confirm it
- Create a project and a task in company B and select the customer linked to the SO you previously created
- Unselect company A from the multi-company widget; only display the records from company B
- Timesheet on the task you previously created
Observed behavior:
- The SOL set by default belongs to company A, thus generating an access right error when trying to timesheet on the task
Expected behavior:
- The SOL set by default should belong to the same company as the task
task-2515259
closesodoo/odoo#70451
X-original-commit: af3c0e1b273d83323a9428f5b369387993ae225f
Related: odoo/enterprise#18160
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>