diff options
| author | Prakash Prajapati <ppr@odoo.com> | 2020-07-01 09:15:17 +0000 |
|---|---|---|
| committer | Prakash Prajapati <ppr@odoo.com> | 2020-08-11 11:32:52 +0000 |
| commit | a866452637ba2eb8b5b8ca17e916f8b30b94b0ad (patch) | |
| tree | 3e215b28907d29fd9f07dc45b00ab841175e9899 /addons | |
| parent | ac6c3901e2f5f40d7fd5574c7d272696adaeeece (diff) | |
[FIX] hr_timesheet: Prevent the stoping timer when time dialog cancelled
Currently, When some one start the timer and click on stop button at
that time it was first stop the timer by super method and then open
the time dialog so timer vanishes and the Start button is displayed again.
After this commit, when click on stop button do not stop the timer by
calling super method of mixin just open the dialog with minutes spent
and on click of SAVE in dialog stop the time and unlink
the related timer entry and on click of CANCEL of dialog
it will not stop the timer.
closes odoo/odoo#55744
Task-id: 2230217
X-original-commit: 96bc68be7f6eae7845c3c5c228b3af34a7f75864
Related: odoo/enterprise#12347
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/hr_timesheet/wizard/project_task_create_timesheet.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/hr_timesheet/wizard/project_task_create_timesheet.py b/addons/hr_timesheet/wizard/project_task_create_timesheet.py index b919361822b..66b45196181 100644 --- a/addons/hr_timesheet/wizard/project_task_create_timesheet.py +++ b/addons/hr_timesheet/wizard/project_task_create_timesheet.py @@ -28,4 +28,5 @@ class ProjectTaskCreateTimesheet(models.TransientModel): 'user_id': self.env.uid, 'unit_amount': self.time_spent, } + self.task_id.user_timer_id.unlink() return self.env['account.analytic.line'].create(values) |
