Browse Source
[FIX] project_task_timer: escape Expected singleton error
pull/266/head
Eugene Molotov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
0 deletions
-
project_task_timer/models/project_task_timer.py
|
|
@ -53,6 +53,10 @@ class ProjectTaskTimer(models.Model): |
|
|
|
@api.model |
|
|
|
@api.constrains('task_timer') |
|
|
|
def toggle_start(self): |
|
|
|
for record in self: |
|
|
|
record._toggle_start_inner() |
|
|
|
|
|
|
|
def _toggle_start_inner(self): |
|
|
|
if self.task_timer is True: |
|
|
|
self.write({'is_user_working': True}) |
|
|
|
time_line = self.env['account.analytic.line'] |
|
|
|