summaryrefslogtreecommitdiff
path: root/doc/reference
diff options
context:
space:
mode:
authorFanny He <fah@odoo.com>2019-08-19 06:20:00 +0000
committerFanny He <fah@odoo.com>2019-08-19 06:20:00 +0000
commitf9f288cd476f3ba95887cf1c625d3285d0a051b1 (patch)
treea09d9e0321eee5e8e095083aca93a6dfd0c4eb93 /doc/reference
parent024d7ebaa04bb39c213d3a54a0695477ad6accae (diff)
[FIX] sale_timesheet: correct the context when viewing a contact's SO's tasks
When accessing a SO's tasks from Contacts (the partner_id's page), and calling action_view_task, the active_id first corresponds to the contact's id. Therefore, if a project.project exists with the contact's id, one can access the SO's tasks, but otherwise, we get the error Record does not exist or has been deleted. (Records: [partner_id], User: ...) Thus, if there is one corresponding project, we first update the context: active_ids is set to project_id, allowing access to the SO's corresponding project's tasks. Note that the same thing is done lower: eval_context.update({'active_id': task_projects.id}) which is too late to avoid trying to access the wrong record. In the case where there are more than 1 corresponding projects (or if there are no corresponding tasks), we don't have the issue. OPW 2052559 closes odoo/odoo#35792 Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Diffstat (limited to 'doc/reference')
0 files changed, 0 insertions, 0 deletions