From f5cfc9341d3ec4a0da656a728087e604a7b72436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 15 Oct 2024 18:55:14 +0000 Subject: [PATCH] Update documentation of attendance --- modules/attendance/CHANGELOG | 4 ++ modules/attendance/doc/design.rst | 67 +++++++++++++++++++++++++++++ modules/attendance/doc/index.rst | 18 +++----- modules/attendance/doc/releases.rst | 7 +++ modules/attendance/setup.py | 6 +-- 5 files changed, 88 insertions(+), 14 deletions(-) create mode 100644 modules/attendance/doc/design.rst create mode 100644 modules/attendance/doc/releases.rst diff --git a/modules/attendance/CHANGELOG b/modules/attendance/CHANGELOG index ea608df961..777a15fdf0 100644 --- a/modules/attendance/CHANGELOG +++ b/modules/attendance/CHANGELOG @@ -20,15 +20,19 @@ Version 6.6.0 - 2022-10-31 * Bug fixes (see mercurial logs for details) Version 6.4.0 - 2022-05-02 +-------------------------- * Bug fixes (see mercurial logs for details) * Add support for Python 3.10 * Remove support for Python 3.6 Version 6.2.0 - 2021-11-01 +-------------------------- * Bug fixes (see mercurial logs for details) Version 6.0.0 - 2021-05-03 +-------------------------- * Bug fixes (see mercurial logs for details) Version 5.8.0 - 2020-11-02 +-------------------------- * Initial release diff --git a/modules/attendance/doc/design.rst b/modules/attendance/doc/design.rst new file mode 100644 index 0000000000..52c5854acb --- /dev/null +++ b/modules/attendance/doc/design.rst @@ -0,0 +1,67 @@ +****** +Design +****** + +The *Attendance Module* introduces the following concepts: + +.. _model-attendance.line: + +Attendance +========== + +*Attendance* records when an `Employee ` enters +or leaves the `Company's ` premises. + +.. seealso:: + + The *Attendance* lines can be found by opening the main menu item: + + |Attendance --> Attendances|__ + + .. |Attendance --> Attendances| replace:: :menuselection:`Attendance --> Attendances` + __ https://demo.tryton.org/model/attendance.line + +.. _model-attendance.period: + +Attendance Period +================= + +The *Attendance Period* is used to group together all the `Attendance +` lines that have taken place up to a certain date and +that were after any previous *Attendance Period*. + +When an *Attendance Period* is closed, it is no longer possible to create, +modify or delete attendance lines before its date. + +.. seealso:: + + The *Attendance Periods* can be found by opening the main menu item: + + |Attendance --> Configuration --> Periods|__ + + .. |Attendance --> Configuration --> Periods| replace:: :menuselection:`Attendance --> Configuration --> Periods` + __ https://demo.tryton.org/model/attendance.period + +.. _model-attendance.sheet: + +Attendance Sheet +================ + +The *Attendance Sheet* reports, for each `Employee +` and day, the total duration the employee was +at the `Company's ` premises. +It also contains a detailed list of each individual visit within that duration. + +.. note:: + When the :doc:`Timesheet Module ` is activated, the + *Attendance Sheet* also displays the duration of the employee's timesheets + for comparison. + +.. seealso:: + + The *Attendance Sheets* can be found by opening the main menu item: + + |Attendance --> Sheets|__ + + .. |Attendance --> Sheets| replace:: :menuselection:`Attendance --> Sheets` + __ https://demo.tryton.org/model/attendance.sheet diff --git a/modules/attendance/doc/index.rst b/modules/attendance/doc/index.rst index 6297848e86..2ceb4a1cd9 100644 --- a/modules/attendance/doc/index.rst +++ b/modules/attendance/doc/index.rst @@ -1,16 +1,12 @@ +################# Attendance Module ################# -The attendance module allows you to track the entry and exit time of employees. -The module also comes with a sheet that shows for each employee the total -duration per day in the company and the detail of the time of entrance and -exit. +The *Attendance Module* allows tracking when employees arrive at, or leave, the +company's premises. -If the timesheet module is activated it also shows the time the employee has -spent on timesheets for that day. +.. toctree:: + :maxdepth: 2 -Period -****** - -Once a period is closed it is no longer possible to create, modify or delete -attendance records that are before that date. + design + releases diff --git a/modules/attendance/doc/releases.rst b/modules/attendance/doc/releases.rst new file mode 100644 index 0000000000..21b13c4745 --- /dev/null +++ b/modules/attendance/doc/releases.rst @@ -0,0 +1,7 @@ +.. _releases-index: + +============= +Release notes +============= + +.. include:: ../CHANGELOG diff --git a/modules/attendance/setup.py b/modules/attendance/setup.py index b8ba4eb841..75c189c822 100755 --- a/modules/attendance/setup.py +++ b/modules/attendance/setup.py @@ -14,8 +14,8 @@ def read(fname, slice=None): content = io.open( os.path.join(os.path.dirname(__file__), fname), 'r', encoding='utf-8').read() - if slice: - content = '\n'.join(content.splitlines()[slice]) + content = re.sub( + r'(?m)^\.\. toctree::\r?\n((^$|^\s.*$)\r?\n)*', '', content) return content @@ -65,7 +65,7 @@ setup(name=name, download_url=download_url, project_urls={ "Bug Tracker": 'https://bugs.tryton.org/', - "Documentation": 'https://docs.tryton.org/', + "Documentation": 'https://docs.tryton.org/latest/modules-attendance', "Forum": 'https://www.tryton.org/forum', "Source Code": 'https://code.tryton.org/tryton', },