From 34981f5ad41f083351c86907718ed38db859ca83 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 6 Dec 2016 10:58:41 +0100 Subject: [PATCH] [FIX] project_issue_sheet: copy issue - Create a project which handles Tasks and Issues - Create an issue - Book some timesheet on the issue, thanks to the tab "Timesheet" - Go to the Timesheet application, you'll see that the time booked appears in the grid - Change the time spent from the grid view. The time added is booked on the issue, while the user doesn't expect it. This is because the modification of a timesheet line copies an existing line, then change the necessary values (see method `adjust_grid`). Ideally, we should have a link module between timesheet grid and project issue. Another solution would be some hack in the `timesheet_grid` module to prevent `issue_id` to be copied. However, there is little to no use of copying a timesheet line in general, so the solution chosen should not affect the existing processes. opw-697018 --- addons/project_issue_sheet/models/account_analytic_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_issue_sheet/models/account_analytic_line.py b/addons/project_issue_sheet/models/account_analytic_line.py index 5ab61ec7321..5b82b37790a 100644 --- a/addons/project_issue_sheet/models/account_analytic_line.py +++ b/addons/project_issue_sheet/models/account_analytic_line.py @@ -6,4 +6,4 @@ from odoo import fields, models class AccountAnalyticLine(models.Model): _inherit = 'account.analytic.line' - issue_id = fields.Many2one('project.issue', 'Issue') + issue_id = fields.Many2one('project.issue', 'Issue', copy=False)