Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] project_timesheet_time_control #1414

Open
wants to merge 63 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
868f79d
project_timesheet_time_control: Module rename and fixes
sergio-teruel Mar 21, 2016
e346b57
project_timesheet_time_control
pedrobaeza Mar 23, 2016
e0e0155
[MIG] project_timesheet_time_control: Migrated to 10.0
luismontalba May 5, 2017
72d3b2a
[FIX] project_timesheet_time_control: Condition always gets evaluated…
fuentes73 Sep 28, 2017
947622b
[MIG] project_timesheet_time_control: Migration to 11.0
ernestotejeda Jun 25, 2018
019e447
[FIX] project_timesheet_time_control: Don't reset task
pedrobaeza Sep 5, 2018
6c8e1b8
[MIG] project_timesheet_time_control: Migration to 12.0
ernestotejeda Nov 12, 2018
a1fd504
Translated using Weblate (Portuguese (Brazil))
Aug 30, 2019
4317b95
[IMP] project_timesheet_time_control: ❤️ 4 UX
yajo Oct 9, 2019
5087df2
[IMP] project_timesheet_time_control: Tell the user no running line w…
yajo Oct 15, 2019
c4d0635
[IMP] project_timesheet_time_control: Refactor with mixin
yajo Oct 15, 2019
076017c
Translated using Weblate (Slovenian)
sysadminmatmoz Nov 8, 2019
0086fbb
Translated using Weblate (German)
marylla Dec 13, 2019
bb12eab
[IMP] : black, isort, prettier
pedrobaeza Jul 7, 2020
d35b1e7
[MIG] project_timesheet_time_control: Migration to 13.0
pedrobaeza Jul 7, 2020
e838fca
[FIX] project_timesheet_time_control: User timezone + comp. with hr_t…
davejames Aug 5, 2020
32494b4
FIX project_timesheet_time_control when not using employees
eLBati Sep 10, 2020
237c2af
Added translation using Weblate (Hebrew)
ygol Oct 19, 2020
2bbff61
Translated using Weblate (Hebrew)
ygol Oct 19, 2020
8e1f2fb
Translated using Weblate (German)
Nov 9, 2020
3c9621a
Translated using Weblate (Dutch)
bosd Apr 21, 2021
b0512fe
[IMP] project_timesheet_time_control: black, isort, prettier
Aug 18, 2021
ae6b222
[MIG] project_timesheet_time_control: Migration to 14.0
Aug 26, 2021
d87818f
Translated using Weblate (Spanish (Argentina))
ibuioli Sep 1, 2021
4ad6fce
[project_timesheet_time_control] 14.0 fix warning
petrus-v Nov 27, 2021
f799d97
Translated using Weblate (Dutch)
bosd Feb 25, 2022
c2e8b5f
Translated using Weblate (French)
remi-filament May 10, 2022
a44b584
Translated using Weblate (Italian)
francesco-ooops Jun 22, 2022
f627b62
Translated using Weblate (Spanish (Argentina))
ibuioli Aug 12, 2022
3165e66
[DCK] Remove development_status to project_timesheet_time_control.
victoralmau Aug 30, 2022
b081689
Translated using Weblate (Finnish)
jarmokortetjarvi Sep 26, 2022
99a0230
[MIG] project_timesheet_time_control: Migration to 15.0
manuelcalerosolis Jun 28, 2022
8051d86
[FIX] project_timesheet_time_control: Avoid incompatibilities
CarlosRoca13 Nov 15, 2022
1f0e307
[FIX] project_timesheet_time_control: Avoid texts on buttons
pedrobaeza Oct 25, 2022
6acf33b
Translated using Weblate (Spanish (Argentina))
ibuioli Nov 30, 2022
257e75b
Translated using Weblate (Spanish)
macagua Mar 2, 2023
ce165d2
[15.0][FIX][project_timesheet_time_control]
ignaciord Mar 18, 2023
0475ea4
[OU-ADD] project_timesheet_time_control: Reset view inheritance
pedrobaeza Apr 6, 2023
5b2e5ca
Translated using Weblate (Italian)
mymage Apr 11, 2023
e1ebe55
[IMP] project_timesheet_time_control: Add base.group_multi_company gr…
victoralmau Apr 28, 2023
9d8709b
Translated using Weblate (Italian)
mymage May 9, 2023
82ca19b
[MIG] project_timesheet_time_control: Migration to 16.0
aktiv-heli-kantawala Jun 6, 2023
ae9969f
[UPD] Update project_timesheet_time_control.pot
Aug 1, 2023
6d660dc
[UPD] README.rst
OCA-git-bot Aug 1, 2023
5a42035
Update translation files
weblate Aug 1, 2023
7ed6461
[UPD] README.rst
OCA-git-bot Sep 3, 2023
8dcce32
Translated using Weblate (Italian)
mymage Oct 10, 2023
8049503
[16.0][FIX]project_timesheet_time_control: Fix warning on method inva…
moctarjallo Oct 19, 2023
a434f4b
[BOT] post-merge updates
OCA-git-bot Oct 19, 2023
222fa85
Translated using Weblate (Portuguese (Brazil))
adrianojprado Oct 28, 2023
c6a228a
Translated using Weblate (Portuguese (Brazil))
adrianojprado Oct 28, 2023
dc15f2d
Translated using Weblate (Catalan)
pere-aquarian Nov 18, 2023
7e53c4b
Translated using Weblate (Swedish)
jakobkrabbe Feb 23, 2024
a9e8249
[IMP] project_timesheet_time_control: pre-commit auto fixes
Jul 29, 2024
1caf06d
[MIG] project_timesheet_time_control: Migration to 17.0
Jul 29, 2024
4e82edb
[UPD] Update project_timesheet_time_control.pot
Jul 30, 2024
c1c97ae
[BOT] post-merge updates
OCA-git-bot Jul 30, 2024
9ca5dbd
Update translation files
weblate Jul 30, 2024
6973e22
Translated using Weblate (Chinese (Traditional) (zh_TW))
WildfootW Aug 10, 2024
fd6e98b
[FIX] project_timesheet_time_control: Avoid access error with ir.model
victoralmau Aug 29, 2024
598cec7
[BOT] post-merge updates
OCA-git-bot Aug 29, 2024
4bd0a63
[IMP] project_timesheet_time_control: pre-commit auto fixes
jdebetaz Jan 15, 2025
600af73
[MIG] project_timesheet_time_control: Migration to 18.0
jdebetaz Jan 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 178 additions & 0 deletions project_timesheet_time_control/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
==============================
Project timesheet time control
==============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:79fd416fe32b5f66051581268833fd8479c5dd9a8904a4e5a7f563f9862deb07
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github
:target: https://github.com/OCA/project/tree/18.0/project_timesheet_time_control
:alt: OCA/project
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/project-18-0/project-18-0-project_timesheet_time_control
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/project&target_branch=18.0
:alt: Try me on Runboat

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

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**

.. contents::
:local:

Installation
============

This module depends on modules found in these repositories:

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

Usage
=====

You can access via timesheets:

1. Go to *Timesheets > Timesheet > All Timesheets*.
2. Create a new record.
3. You will see now that the *Date* field contains also time
information.
4. If you don't select any "project", you will be able to select any
"task", opened or not.
5. Selecting a "task", the corresponding "project" is filled.
6. 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.
7. At the end of the line, you will see a stop button.
8. When you press this button, the difference between *Date* field and
the current time is saved in the "Duration" field.
9. You can modify the *Date* field for altering the computation of the
duration.
10. 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.
11. 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:

1. Go to *Timesheet > Timesheet > Start work*.
2. 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:

1. Go to *Project > Projects*.
2. If a project has a running timesheet line, it will display a *Stop*
button.
3. 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.
4. You can see the same in list and form views.

Or via tasks:

1. Go to *Project > All Tasks*.
2. If a task has a running timesheet line, it will display a *Stop*
button.
3. 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.
4. You can see the same in list view.
5. Click on any existing task or create a new one.
6. You can see the same feature in the action buttons box.
7. 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
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/project/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/project/issues/new?body=module:%20project_timesheet_time_control%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza
- Antonio Espinosa
- Carlos Dauden
- Sergio Teruel
- Luis M. ontalba
- Ernesto Tejeda
- Jairo Llopis
- Carlos Roca

- `Sygel <https://www.sygel.es>`__:

- Valentín Vinagre
- Roger Sans

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-ernestotejeda| image:: https://github.com/ernestotejeda.png?size=40px
:target: https://github.com/ernestotejeda
:alt: ernestotejeda

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ernestotejeda|

This module is part of the `OCA/project <https://github.com/OCA/project/tree/18.0/project_timesheet_time_control>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions project_timesheet_time_control/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +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
27 changes: 27 additions & 0 deletions project_timesheet_time_control/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2016 Tecnativa - Sergio Teruel
# Copyright 2016-2018 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Ernesto Tejeda
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

{
"name": "Project timesheet time control",
"version": "18.0.1.0.0",
"category": "Project",
"author": "Tecnativa," "Odoo Community Association (OCA)",
"maintainers": ["ernestotejeda"],
"website": "https://github.com/OCA/project",
"depends": [
"hr_timesheet",
],
"data": [
"security/ir.model.access.csv",
"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,
"post_init_hook": "post_init_hook",
}
13 changes: 13 additions & 0 deletions project_timesheet_time_control/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2016-2017 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html


def post_init_hook(env):
"""Put the date with 00:00:00 as the date_time for the line."""
env.cr.execute(
"""UPDATE account_analytic_line
SET date_time = to_timestamp(date || ' 00:00:00',
'YYYY/MM/DD HH24:MI:SS')
WHERE date(date_time) != date
"""
)
Loading
Loading