diff --git a/project_task_timer/__manifest__.py b/project_task_timer/__manifest__.py index c074dea46..cde0465b9 100644 --- a/project_task_timer/__manifest__.py +++ b/project_task_timer/__manifest__.py @@ -22,7 +22,7 @@ ############################################################################## { 'name': 'Project Task Timer', - 'version': '10.0.1.0', + 'version': '10.0.2.0', 'summary': """Task Timer With Start & Stop""", 'description': """"This module helps you to track time sheet in project automatically.""", 'category': 'Project', diff --git a/project_task_timer/doc/changelog.rst b/project_task_timer/doc/changelog.rst new file mode 100644 index 000000000..0e1ce0b12 --- /dev/null +++ b/project_task_timer/doc/changelog.rst @@ -0,0 +1,8 @@ +Changelog +========= +* Jesni Banu contact: jesni@cybrosys.in + +`10.0.2.0.0` +------------ +- Timer unit changed to minutes (To compact time sheet). + diff --git a/project_task_timer/models/project_task_timer.py b/project_task_timer/models/project_task_timer.py index b3f081ab4..e50be10b3 100644 --- a/project_task_timer/models/project_task_timer.py +++ b/project_task_timer/models/project_task_timer.py @@ -29,6 +29,7 @@ class ProjectTaskTimeSheet(models.Model): date_start = fields.Datetime(string='Start Date') date_end = fields.Datetime(string='End Date', readonly=1) + timer_duration = fields.Float(invisible=1) class ProjectTaskTimer(models.Model): @@ -43,11 +44,11 @@ class ProjectTaskTimer(models.Model): order.is_user_working = False @api.multi - @api.depends('timesheet_ids.unit_amount') + @api.depends('timesheet_ids.timer_duration') def _compute_duration(self): self.duration = 0 for each in self: - each.duration = sum(each.timesheet_ids.mapped('unit_amount')) + each.duration = sum(each.timesheet_ids.mapped('timer_duration')) @api.multi def toggle_start(self): @@ -73,9 +74,11 @@ class ProjectTaskTimer(models.Model): if time_line.date_end: diff = fields.Datetime.from_string(time_line.date_end) - fields.Datetime.from_string( time_line.date_start) - time_line.unit_amount = round(diff.total_seconds() / 60.0, 2) + time_line.timer_duration = round(diff.total_seconds() / 60.0, 2) + time_line.unit_amount = round(diff.total_seconds() / (60.0 * 60.0), 2) else: time_line.unit_amount = 0.0 + time_line.timer_duration = 0.0 task_timer = fields.Boolean() is_user_working = fields.Boolean( diff --git a/project_task_timer/static/description/timer3.png b/project_task_timer/static/description/timer3.png index 9bdba03b5..9ac54d1dd 100644 Binary files a/project_task_timer/static/description/timer3.png and b/project_task_timer/static/description/timer3.png differ diff --git a/project_task_timer/views/project_task_timer_view.xml b/project_task_timer/views/project_task_timer_view.xml index a4d24c3a8..ad99c1e0e 100644 --- a/project_task_timer/views/project_task_timer_view.xml +++ b/project_task_timer/views/project_task_timer_view.xml @@ -38,6 +38,7 @@ +