Skip to content

Commit

Permalink
[IMP] project_timesheet_line: ❤️ 4 UX
Browse files Browse the repository at this point in the history
This is a huge improvement in this module's usability, although basic functionality stays the same. Let me summmarize:

- In `account.analytic.line` views, the *Stop* button is replaced by colorful *Resume/Stop* buttons.
- The new *Resume* button will display a wizard that will duplicate all meaningful fields from the previous `account.analytic.line` record and auto-stop the previous running timer, if any.
- If the previous running timer is very old, some warnings will be displayed.
- In `project.project` and `project.task` views, I added the same buttons (well... it's *Start* instead of *Resume*, because you could not have worked before in that project or task, but it behaves the same).
- If using it from a `project.task`, *Start* will duplicate meaningful fields from your latest line in that task.
- If using it from a `project.project`, *Start* will duplicate meaningful fields your latest line in that project that had no task associated.
- All kanban, kanban mobile, list and form views are covered.
- Access the new wizard directly from a menu item if you prefer.
- I removed, BTW, some Bootstrap 3 and bad replacements in some views.
  • Loading branch information
yajo committed Oct 2, 2019
1 parent d8ead05 commit 65d34a9
Show file tree
Hide file tree
Showing 21 changed files with 1,476 additions and 219 deletions.
68 changes: 53 additions & 15 deletions project_timesheet_time_control/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ Project timesheet time control

|badge1| |badge2| |badge3| |badge4| |badge5|

* This module adds a button at account analytic line level to compute the spent
time, in minutes, from start date to the current moment.
* It adds a datetime field that replaces ``date`` field in tree view, and write
date field with datetime field value.
Allow to track the exact moment when a timesheet line is started (not only
the day, but also the minute and second) and let users start and stop timers
easily.

**Table of contents**

Expand All @@ -38,9 +37,10 @@ Project timesheet time control
Installation
============

This module depends on hr_timesheet_task_stage and hr_timesheet_task_domain
modules that are in `OCA/timesheet <https://github.com/OCA/timesheet>`_
repository
This module depends on modules found in these repositories:

* `OCA/timesheet <https://github.com/OCA/timesheet>`__
* `OCA/web <https://github.com/OCA/web>`__

Usage
=====
Expand All @@ -49,27 +49,64 @@ You can access via timesheets:

#. Go to *Timesheets > Timesheet > All Timesheets*.
#. Create a new record.
#. You will see now that the "Date" field contains also time information.
#. You will see now that the *Date* field contains also time information.
#. If you don't select any "project", you will be able to select any "task",
opened or not.
#. Selecting a "task", the corresponding "project" is filled.
#. Selecting a "project", tasks are filtered for only allow
to select opened tasks for that project. Remember that an opened task is
a task whose stage doesn't have "Closed" mark checked.
#. At the end of the line, you will see an stop button.
#. When you press this button, the difference between "Date" field and the
current time, writing this in the field "Duration".
#. You can modify the "Date" field for altering the computation of the
#. At the end of the line, you will see a stop button.
#. When you press this button, the difference between *Date* field and the
current time is saved in the "Duration" field.
#. You can modify the *Date* field for altering the computation of the
duration.
#. After a record is stopped, you see a *Resume* button, which will open a
wizard that inherits all relevant values from that timesheet line and lets
you duplicate it to indicate you start working in the same thing.
#. If you didn't stop the timer, but still hit *Resume* in any other, the
wizard will tell you that you have a running timer and that starting a new
one will stop the other one that is running.

To access the wizard directly:

#. Go to *Timesheet > Timesheet > Start work*.
#. You will be able to enter a new timesheet line from scratch, but by using
this wizard, you avoid problems with old or duplicate running timers.

Or via projects:

#. Go to *Project > Projects*.
#. If a project has a running timesheet line, it will display a *Stop* button.
#. Other projects that have enabled timesheets will display a *Start* button
that will open the same wizard as the timesheet lines, but duplicating
project's last timesheet line without a task.
#. You can see the same in list and form views.

Or via tasks:

#. Go to Project > Search > Tasks.
#. Click on one existing task or create a new one.
#. On the "Timesheets" page, you will be able to handle records the same way
#. Go to *Project > All Tasks*.
#. If a task has a running timesheet line, it will display a *Stop* button.
#. Other tasks that have enabled timesheets will display a *Start* button
that will open the same wizard as the timesheet lines, duplicating task's
last timesheet line.
#. You can see the same in list view.
#. Click on any existing task or create a new one.
#. You can see the same feature in the action buttons box.
#. On the *Timesheets* page, you will be able to handle records the same way
as you do in the above explanation (except the task selection part, which
in this case doesn't appear as it's the current one).

Note: All the *Start/Resume/Stop* features are disabled if you don't belong to
the *Timesheets/User* group or if you are viewing a timesheet that belongs
to another user.

Known issues / Roadmap
======================

* Rename to ``hr_timesheet_time_control``.
* Move to `OCA/timesheet <https://github.com/OCA/timesheet>`__.

Bug Tracker
===========

Expand Down Expand Up @@ -99,6 +136,7 @@ Contributors
* Sergio Teruel
* Luis M. ontalba
* Ernesto Tejeda
* Jairo Llopis

Maintainers
~~~~~~~~~~~
Expand Down
1 change: 1 addition & 0 deletions project_timesheet_time_control/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import models
from . import wizards
from .hooks import post_init_hook
4 changes: 4 additions & 0 deletions project_timesheet_time_control/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
'depends': [
'hr_timesheet_task_stage',
'hr_timesheet_task_domain',
'web_ir_actions_act_multi',
'web_ir_actions_act_view_reload',
],
'data': [
'views/account_analytic_line_view.xml',
'views/project_project_view.xml',
'views/project_task_view.xml',
'wizards/hr_timesheet_switch_view.xml',
],
'license': 'AGPL-3',
'installable': True,
Expand Down
Loading

0 comments on commit 65d34a9

Please sign in to comment.