From 521f400351e356e33789b25a4bbf12dc8fdfd916 Mon Sep 17 00:00:00 2001 From: Carmen Bianca BAKKER Date: Thu, 20 Jun 2024 17:20:04 +0200 Subject: [PATCH 1/6] [ADD] hr_timesheet_overtime_begin_end Signed-off-by: Carmen Bianca BAKKER --- hr_timesheet_overtime_begin_end/README.rst | 70 +++ hr_timesheet_overtime_begin_end/__init__.py | 5 + .../__manifest__.py | 21 + .../models/__init__.py | 5 + .../models/account_analytic_line.py | 14 + .../readme/CONTRIBUTORS.rst | 3 + .../readme/DESCRIPTION.rst | 1 + .../static/description/index.html | 420 ++++++++++++++++++ .../tests/__init__.py | 5 + .../tests/test_analytic_line.py | 72 +++ .../addons/hr_timesheet_overtime_begin_end | 1 + .../hr_timesheet_overtime_begin_end/setup.py | 6 + 12 files changed, 623 insertions(+) create mode 100644 hr_timesheet_overtime_begin_end/README.rst create mode 100644 hr_timesheet_overtime_begin_end/__init__.py create mode 100644 hr_timesheet_overtime_begin_end/__manifest__.py create mode 100644 hr_timesheet_overtime_begin_end/models/__init__.py create mode 100644 hr_timesheet_overtime_begin_end/models/account_analytic_line.py create mode 100644 hr_timesheet_overtime_begin_end/readme/CONTRIBUTORS.rst create mode 100644 hr_timesheet_overtime_begin_end/readme/DESCRIPTION.rst create mode 100644 hr_timesheet_overtime_begin_end/static/description/index.html create mode 100644 hr_timesheet_overtime_begin_end/tests/__init__.py create mode 100644 hr_timesheet_overtime_begin_end/tests/test_analytic_line.py create mode 120000 setup/hr_timesheet_overtime_begin_end/odoo/addons/hr_timesheet_overtime_begin_end create mode 100644 setup/hr_timesheet_overtime_begin_end/setup.py diff --git a/hr_timesheet_overtime_begin_end/README.rst b/hr_timesheet_overtime_begin_end/README.rst new file mode 100644 index 0000000..ccc8206 --- /dev/null +++ b/hr_timesheet_overtime_begin_end/README.rst @@ -0,0 +1,70 @@ +====================================================== +Timesheet - Overtime and begin/end hours compatibility +====================================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:5ab790e671629b45c0297eceb50037e97ab4827da3d637687db534dd0dd0dde0 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-coopiteasy%2Fcie--timesheet-lightgray.png?logo=github + :target: https://github.com/coopiteasy/cie-timesheet/tree/16.0/hr_timesheet_overtime_begin_end + :alt: coopiteasy/cie-timesheet + +|badge1| |badge2| |badge3| + +Make the two modules compatible. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Coop IT Easy SC + +Contributors +~~~~~~~~~~~~ + +* `Coop IT Easy SC `_: + + * Carmen Bianca BAKKER + +Maintainers +~~~~~~~~~~~ + +.. |maintainer-carmenbianca| image:: https://github.com/carmenbianca.png?size=40px + :target: https://github.com/carmenbianca + :alt: carmenbianca + +Current maintainer: + +|maintainer-carmenbianca| + +This module is part of the `coopiteasy/cie-timesheet `_ project on GitHub. + +You are welcome to contribute. diff --git a/hr_timesheet_overtime_begin_end/__init__.py b/hr_timesheet_overtime_begin_end/__init__.py new file mode 100644 index 0000000..3eb7887 --- /dev/null +++ b/hr_timesheet_overtime_begin_end/__init__.py @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2024 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from . import models diff --git a/hr_timesheet_overtime_begin_end/__manifest__.py b/hr_timesheet_overtime_begin_end/__manifest__.py new file mode 100644 index 0000000..ed42081 --- /dev/null +++ b/hr_timesheet_overtime_begin_end/__manifest__.py @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2024 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +{ + "name": "Timesheet - Overtime and begin/end hours compatibility", + "summary": """ + Make the two modules compatible.""", + "version": "16.0.1.0.0", + "category": "Human Resources", + "website": "https://github.com/coopiteasy/cie-timesheet", + "author": "Coop IT Easy SC", + "maintainers": ["carmenbianca"], + "license": "AGPL-3", + "application": False, + "depends": [ + "hr_timesheet_overtime", + "hr_timesheet_begin_end", + ], + "auto_install": True, +} diff --git a/hr_timesheet_overtime_begin_end/models/__init__.py b/hr_timesheet_overtime_begin_end/models/__init__.py new file mode 100644 index 0000000..84f4adc --- /dev/null +++ b/hr_timesheet_overtime_begin_end/models/__init__.py @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2024 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from . import account_analytic_line diff --git a/hr_timesheet_overtime_begin_end/models/account_analytic_line.py b/hr_timesheet_overtime_begin_end/models/account_analytic_line.py new file mode 100644 index 0000000..93cccad --- /dev/null +++ b/hr_timesheet_overtime_begin_end/models/account_analytic_line.py @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: 2024 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from odoo import models + + +class AnalyticLine(models.Model): + _inherit = "account.analytic.line" + + def unit_amount_from_start_stop(self): + result = super().unit_amount_from_start_stop() + result *= self.rate_for_date(self.date) + return result diff --git a/hr_timesheet_overtime_begin_end/readme/CONTRIBUTORS.rst b/hr_timesheet_overtime_begin_end/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..f1ac675 --- /dev/null +++ b/hr_timesheet_overtime_begin_end/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* `Coop IT Easy SC `_: + + * Carmen Bianca BAKKER diff --git a/hr_timesheet_overtime_begin_end/readme/DESCRIPTION.rst b/hr_timesheet_overtime_begin_end/readme/DESCRIPTION.rst new file mode 100644 index 0000000..58c190c --- /dev/null +++ b/hr_timesheet_overtime_begin_end/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +Make the two modules compatible. diff --git a/hr_timesheet_overtime_begin_end/static/description/index.html b/hr_timesheet_overtime_begin_end/static/description/index.html new file mode 100644 index 0000000..a9ed5b0 --- /dev/null +++ b/hr_timesheet_overtime_begin_end/static/description/index.html @@ -0,0 +1,420 @@ + + + + + +Timesheet - Overtime and begin/end hours compatibility + + + +
+

Timesheet - Overtime and begin/end hours compatibility

+ + +

Beta License: AGPL-3 coopiteasy/cie-timesheet

+

Make the two modules compatible.

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Coop IT Easy SC
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

Current maintainer:

+

carmenbianca

+

This module is part of the coopiteasy/cie-timesheet project on GitHub.

+

You are welcome to contribute.

+
+
+
+ + diff --git a/hr_timesheet_overtime_begin_end/tests/__init__.py b/hr_timesheet_overtime_begin_end/tests/__init__.py new file mode 100644 index 0000000..926bcd5 --- /dev/null +++ b/hr_timesheet_overtime_begin_end/tests/__init__.py @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2024 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from . import test_analytic_line diff --git a/hr_timesheet_overtime_begin_end/tests/test_analytic_line.py b/hr_timesheet_overtime_begin_end/tests/test_analytic_line.py new file mode 100644 index 0000000..27ef66d --- /dev/null +++ b/hr_timesheet_overtime_begin_end/tests/test_analytic_line.py @@ -0,0 +1,72 @@ +# SPDX-FileCopyrightText: 2024 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from odoo.tests.common import TransactionCase + + +class TestAnalyticLine(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.project = cls.env.ref("project.project_project_1") + cls.employee = cls.env.ref("hr.employee_qdp") + # I'm not sure what this record does in this context. + cls.overtime = cls.env["resource.overtime"].create({"name": "test"}) + cls.rate = cls.env["resource.overtime.rate"].create( + { + "name": "test", + "dayofweek": "0", # Monday + "rate": 2.0, + "overtime_id": cls.overtime.id, + } + ) + + def base_line(self): + return { + "name": "test", + "date": "2024-01-01", # Monday + "time_start": 10.0, + "time_stop": 12.0, + "project_id": self.project.id, + "employee_id": self.employee.id, + } + + def test_rate_applied(self): + line = self.base_line() + line_record = self.env["account.analytic.line"].create(line) + self.assertEqual(line_record.unit_amount, 4.0) + + def test_rate_applied_after_edit(self): + line = self.base_line() + del line["time_start"] + del line["time_stop"] + line_record = self.env["account.analytic.line"].create(line) + line_record.write({"time_start": 10.0, "time_stop": 12.0}) + self.assertEqual(line_record.unit_amount, 4.0) + + def test_rate_not_double_applied(self): + line = self.base_line() + del line["time_start"] + del line["time_stop"] + + # Emulating a transient record before it is actually created. + line_new = self.env["account.analytic.line"].new(line) + line_new.time_start = 10.0 + line_new.time_stop = 12.0 + self.assertEqual(line_new.unit_amount, 4.0) + + # Prepare the transient data for writing to a new record. + # + # Annoyingly, the value for unit_amount is not in _cache, so we have to + # add it here. + # + # Ideally I would emulate this with a Form(), but the necessary fields + # are not available in a form. This is the closest emulation. + vals = line_new._convert_to_write(line_new._cache) + vals.setdefault("unit_amount", line_new.unit_amount) + line_record = self.env["account.analytic.line"].create(vals) + + # The rate was already applied on the transient record. Don't also apply + # it on creation. + self.assertEqual(line_record.unit_amount, 4.0) diff --git a/setup/hr_timesheet_overtime_begin_end/odoo/addons/hr_timesheet_overtime_begin_end b/setup/hr_timesheet_overtime_begin_end/odoo/addons/hr_timesheet_overtime_begin_end new file mode 120000 index 0000000..58ec292 --- /dev/null +++ b/setup/hr_timesheet_overtime_begin_end/odoo/addons/hr_timesheet_overtime_begin_end @@ -0,0 +1 @@ +../../../../hr_timesheet_overtime_begin_end \ No newline at end of file diff --git a/setup/hr_timesheet_overtime_begin_end/setup.py b/setup/hr_timesheet_overtime_begin_end/setup.py new file mode 100644 index 0000000..28c57bb --- /dev/null +++ b/setup/hr_timesheet_overtime_begin_end/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) From d861ab0c5a3f073f79258a98b1ed9c024706846b Mon Sep 17 00:00:00 2001 From: Carmen Bianca BAKKER Date: Thu, 4 Jul 2024 11:14:35 +0200 Subject: [PATCH 2/6] [MIG] hr_timesheet_overtime_begin_end: backport to 12.0 Signed-off-by: Carmen Bianca BAKKER --- .../__manifest__.py | 6 ++--- .../models/account_analytic_line.py | 22 ++++++++++++++++++- .../tests/test_analytic_line.py | 16 +++++--------- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/hr_timesheet_overtime_begin_end/__manifest__.py b/hr_timesheet_overtime_begin_end/__manifest__.py index ed42081..110f129 100644 --- a/hr_timesheet_overtime_begin_end/__manifest__.py +++ b/hr_timesheet_overtime_begin_end/__manifest__.py @@ -6,16 +6,16 @@ "name": "Timesheet - Overtime and begin/end hours compatibility", "summary": """ Make the two modules compatible.""", - "version": "16.0.1.0.0", + "version": "12.0.1.0.0", "category": "Human Resources", - "website": "https://github.com/coopiteasy/cie-timesheet", + "website": "https://coopiteasy.be", "author": "Coop IT Easy SC", "maintainers": ["carmenbianca"], "license": "AGPL-3", "application": False, "depends": [ "hr_timesheet_overtime", - "hr_timesheet_begin_end", + "hr_timesheet_activity_begin_end", ], "auto_install": True, } diff --git a/hr_timesheet_overtime_begin_end/models/account_analytic_line.py b/hr_timesheet_overtime_begin_end/models/account_analytic_line.py index 93cccad..6e5eae2 100644 --- a/hr_timesheet_overtime_begin_end/models/account_analytic_line.py +++ b/hr_timesheet_overtime_begin_end/models/account_analytic_line.py @@ -2,12 +2,32 @@ # # SPDX-License-Identifier: AGPL-3.0-or-later -from odoo import models +from odoo import api, models class AnalyticLine(models.Model): _inherit = "account.analytic.line" + # This is a bit of a hack. Normally in hr_timesheet_overtime, the value of + # unit_amount is updated in this method as part of writing or creating a + # record. However, in hr_timesheet_activity_begin_end, unit_amount is + # adjusted during an onchange using unit_amount_from_start_stop. + # + # If BOTH the onchange and the write method adjust the value of unit_amount, + # then the rate is applied twice, which is not good. Therefore, this method + # is 'disabled', and we instead rely on onchange to correctly set the value + # of unit_amount. + # + # The disadvantage is that programmatic usages of hr_timesheet_overtime no + # longer work here. The advantage is that you can now manually override the + # value of unit_amount without the rate being automatically applied. + # + # In version 16, this behaviour is a lot less messy, because it uses compute + # functions instead of the aforementioned methods. + @api.model + def _update_values(self, values): + return + def unit_amount_from_start_stop(self): result = super().unit_amount_from_start_stop() result *= self.rate_for_date(self.date) diff --git a/hr_timesheet_overtime_begin_end/tests/test_analytic_line.py b/hr_timesheet_overtime_begin_end/tests/test_analytic_line.py index 27ef66d..60d742c 100644 --- a/hr_timesheet_overtime_begin_end/tests/test_analytic_line.py +++ b/hr_timesheet_overtime_begin_end/tests/test_analytic_line.py @@ -2,10 +2,10 @@ # # SPDX-License-Identifier: AGPL-3.0-or-later -from odoo.tests.common import TransactionCase +from odoo.tests.common import SavepointCase -class TestAnalyticLine(TransactionCase): +class TestAnalyticLine(SavepointCase): @classmethod def setUpClass(cls): super().setUpClass() @@ -34,15 +34,8 @@ def base_line(self): def test_rate_applied(self): line = self.base_line() - line_record = self.env["account.analytic.line"].create(line) - self.assertEqual(line_record.unit_amount, 4.0) - - def test_rate_applied_after_edit(self): - line = self.base_line() - del line["time_start"] - del line["time_stop"] - line_record = self.env["account.analytic.line"].create(line) - line_record.write({"time_start": 10.0, "time_stop": 12.0}) + line_record = self.env["account.analytic.line"].new(line) + line_record.onchange_hours_start_stop() self.assertEqual(line_record.unit_amount, 4.0) def test_rate_not_double_applied(self): @@ -54,6 +47,7 @@ def test_rate_not_double_applied(self): line_new = self.env["account.analytic.line"].new(line) line_new.time_start = 10.0 line_new.time_stop = 12.0 + line_new.onchange_hours_start_stop() self.assertEqual(line_new.unit_amount, 4.0) # Prepare the transient data for writing to a new record. From 8b73fbb98786d35f9700f0d326768e675326404f Mon Sep 17 00:00:00 2001 From: Carmen Bianca BAKKER Date: Mon, 29 Jul 2024 11:52:59 +0200 Subject: [PATCH 3/6] [FIX] hr_timesheet_overtime_begin_end: Apply rate if times aren't used Signed-off-by: Carmen Bianca BAKKER --- .../models/account_analytic_line.py | 7 ++++++- .../tests/test_analytic_line.py | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/hr_timesheet_overtime_begin_end/models/account_analytic_line.py b/hr_timesheet_overtime_begin_end/models/account_analytic_line.py index 6e5eae2..2f5c760 100644 --- a/hr_timesheet_overtime_begin_end/models/account_analytic_line.py +++ b/hr_timesheet_overtime_begin_end/models/account_analytic_line.py @@ -26,7 +26,12 @@ class AnalyticLine(models.Model): # functions instead of the aforementioned methods. @api.model def _update_values(self, values): - return + time_start = values.get("time_start", self.time_start) + time_stop = values.get("time_stop", self.time_stop) + # Do not double-compute if we're using times. + if time_start or time_stop: + return + return super()._update_values(values) def unit_amount_from_start_stop(self): result = super().unit_amount_from_start_stop() diff --git a/hr_timesheet_overtime_begin_end/tests/test_analytic_line.py b/hr_timesheet_overtime_begin_end/tests/test_analytic_line.py index 60d742c..af141ff 100644 --- a/hr_timesheet_overtime_begin_end/tests/test_analytic_line.py +++ b/hr_timesheet_overtime_begin_end/tests/test_analytic_line.py @@ -64,3 +64,11 @@ def test_rate_not_double_applied(self): # The rate was already applied on the transient record. Don't also apply # it on creation. self.assertEqual(line_record.unit_amount, 4.0) + + def test_rate_applied_if_no_times(self): + line = self.base_line() + del line["time_start"] + del line["time_stop"] + line["unit_amount"] = 1 + line_record = self.env["account.analytic.line"].create(line) + self.assertEqual(line_record.unit_amount, 2) From 5dd155a53598a9759cb344540ab1f6b0a97a9e86 Mon Sep 17 00:00:00 2001 From: Carmen Bianca BAKKER Date: Mon, 29 Jul 2024 11:54:39 +0200 Subject: [PATCH 4/6] [REF] Rename to hr_timesheet_overtime_rate_begin_end This is the name of the module in v16. Because this module is new, this will save us some small migratory work later. Signed-off-by: Carmen Bianca BAKKER --- .../README.rst | 0 .../__init__.py | 0 .../__manifest__.py | 0 .../models/__init__.py | 0 .../models/account_analytic_line.py | 0 .../readme/CONTRIBUTORS.rst | 0 .../readme/DESCRIPTION.rst | 0 .../static/description/index.html | 0 .../tests/__init__.py | 0 .../tests/test_analytic_line.py | 0 .../odoo/addons/hr_timesheet_overtime_begin_end | 1 - .../odoo/addons/hr_timesheet_overtime_rate_begin_end | 1 + .../odoo/addons/hr_timesheet_rate_overtime_begin_end | 1 + .../setup.py | 0 14 files changed, 2 insertions(+), 1 deletion(-) rename {hr_timesheet_overtime_begin_end => hr_timesheet_overtime_rate_begin_end}/README.rst (100%) rename {hr_timesheet_overtime_begin_end => hr_timesheet_overtime_rate_begin_end}/__init__.py (100%) rename {hr_timesheet_overtime_begin_end => hr_timesheet_overtime_rate_begin_end}/__manifest__.py (100%) rename {hr_timesheet_overtime_begin_end => hr_timesheet_overtime_rate_begin_end}/models/__init__.py (100%) rename {hr_timesheet_overtime_begin_end => hr_timesheet_overtime_rate_begin_end}/models/account_analytic_line.py (100%) rename {hr_timesheet_overtime_begin_end => hr_timesheet_overtime_rate_begin_end}/readme/CONTRIBUTORS.rst (100%) rename {hr_timesheet_overtime_begin_end => hr_timesheet_overtime_rate_begin_end}/readme/DESCRIPTION.rst (100%) rename {hr_timesheet_overtime_begin_end => hr_timesheet_overtime_rate_begin_end}/static/description/index.html (100%) rename {hr_timesheet_overtime_begin_end => hr_timesheet_overtime_rate_begin_end}/tests/__init__.py (100%) rename {hr_timesheet_overtime_begin_end => hr_timesheet_overtime_rate_begin_end}/tests/test_analytic_line.py (100%) delete mode 120000 setup/hr_timesheet_overtime_begin_end/odoo/addons/hr_timesheet_overtime_begin_end create mode 120000 setup/hr_timesheet_overtime_rate_begin_end/odoo/addons/hr_timesheet_overtime_rate_begin_end create mode 120000 setup/hr_timesheet_overtime_rate_begin_end/odoo/addons/hr_timesheet_rate_overtime_begin_end rename setup/{hr_timesheet_overtime_begin_end => hr_timesheet_overtime_rate_begin_end}/setup.py (100%) diff --git a/hr_timesheet_overtime_begin_end/README.rst b/hr_timesheet_overtime_rate_begin_end/README.rst similarity index 100% rename from hr_timesheet_overtime_begin_end/README.rst rename to hr_timesheet_overtime_rate_begin_end/README.rst diff --git a/hr_timesheet_overtime_begin_end/__init__.py b/hr_timesheet_overtime_rate_begin_end/__init__.py similarity index 100% rename from hr_timesheet_overtime_begin_end/__init__.py rename to hr_timesheet_overtime_rate_begin_end/__init__.py diff --git a/hr_timesheet_overtime_begin_end/__manifest__.py b/hr_timesheet_overtime_rate_begin_end/__manifest__.py similarity index 100% rename from hr_timesheet_overtime_begin_end/__manifest__.py rename to hr_timesheet_overtime_rate_begin_end/__manifest__.py diff --git a/hr_timesheet_overtime_begin_end/models/__init__.py b/hr_timesheet_overtime_rate_begin_end/models/__init__.py similarity index 100% rename from hr_timesheet_overtime_begin_end/models/__init__.py rename to hr_timesheet_overtime_rate_begin_end/models/__init__.py diff --git a/hr_timesheet_overtime_begin_end/models/account_analytic_line.py b/hr_timesheet_overtime_rate_begin_end/models/account_analytic_line.py similarity index 100% rename from hr_timesheet_overtime_begin_end/models/account_analytic_line.py rename to hr_timesheet_overtime_rate_begin_end/models/account_analytic_line.py diff --git a/hr_timesheet_overtime_begin_end/readme/CONTRIBUTORS.rst b/hr_timesheet_overtime_rate_begin_end/readme/CONTRIBUTORS.rst similarity index 100% rename from hr_timesheet_overtime_begin_end/readme/CONTRIBUTORS.rst rename to hr_timesheet_overtime_rate_begin_end/readme/CONTRIBUTORS.rst diff --git a/hr_timesheet_overtime_begin_end/readme/DESCRIPTION.rst b/hr_timesheet_overtime_rate_begin_end/readme/DESCRIPTION.rst similarity index 100% rename from hr_timesheet_overtime_begin_end/readme/DESCRIPTION.rst rename to hr_timesheet_overtime_rate_begin_end/readme/DESCRIPTION.rst diff --git a/hr_timesheet_overtime_begin_end/static/description/index.html b/hr_timesheet_overtime_rate_begin_end/static/description/index.html similarity index 100% rename from hr_timesheet_overtime_begin_end/static/description/index.html rename to hr_timesheet_overtime_rate_begin_end/static/description/index.html diff --git a/hr_timesheet_overtime_begin_end/tests/__init__.py b/hr_timesheet_overtime_rate_begin_end/tests/__init__.py similarity index 100% rename from hr_timesheet_overtime_begin_end/tests/__init__.py rename to hr_timesheet_overtime_rate_begin_end/tests/__init__.py diff --git a/hr_timesheet_overtime_begin_end/tests/test_analytic_line.py b/hr_timesheet_overtime_rate_begin_end/tests/test_analytic_line.py similarity index 100% rename from hr_timesheet_overtime_begin_end/tests/test_analytic_line.py rename to hr_timesheet_overtime_rate_begin_end/tests/test_analytic_line.py diff --git a/setup/hr_timesheet_overtime_begin_end/odoo/addons/hr_timesheet_overtime_begin_end b/setup/hr_timesheet_overtime_begin_end/odoo/addons/hr_timesheet_overtime_begin_end deleted file mode 120000 index 58ec292..0000000 --- a/setup/hr_timesheet_overtime_begin_end/odoo/addons/hr_timesheet_overtime_begin_end +++ /dev/null @@ -1 +0,0 @@ -../../../../hr_timesheet_overtime_begin_end \ No newline at end of file diff --git a/setup/hr_timesheet_overtime_rate_begin_end/odoo/addons/hr_timesheet_overtime_rate_begin_end b/setup/hr_timesheet_overtime_rate_begin_end/odoo/addons/hr_timesheet_overtime_rate_begin_end new file mode 120000 index 0000000..348076d --- /dev/null +++ b/setup/hr_timesheet_overtime_rate_begin_end/odoo/addons/hr_timesheet_overtime_rate_begin_end @@ -0,0 +1 @@ +../../../../hr_timesheet_overtime_rate_begin_end \ No newline at end of file diff --git a/setup/hr_timesheet_overtime_rate_begin_end/odoo/addons/hr_timesheet_rate_overtime_begin_end b/setup/hr_timesheet_overtime_rate_begin_end/odoo/addons/hr_timesheet_rate_overtime_begin_end new file mode 120000 index 0000000..2704a92 --- /dev/null +++ b/setup/hr_timesheet_overtime_rate_begin_end/odoo/addons/hr_timesheet_rate_overtime_begin_end @@ -0,0 +1 @@ +../../../../hr_timesheet_rate_overtime_begin_end \ No newline at end of file diff --git a/setup/hr_timesheet_overtime_begin_end/setup.py b/setup/hr_timesheet_overtime_rate_begin_end/setup.py similarity index 100% rename from setup/hr_timesheet_overtime_begin_end/setup.py rename to setup/hr_timesheet_overtime_rate_begin_end/setup.py From 075b98d418450e12b9ee2d7c596dbb3243652a97 Mon Sep 17 00:00:00 2001 From: Carmen Bianca BAKKER Date: Fri, 27 Sep 2024 17:08:36 +0200 Subject: [PATCH 5/6] [FIX] test-requirements: Add freezegun Signed-off-by: Carmen Bianca BAKKER --- test-requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test-requirements.txt b/test-requirements.txt index cf1acdf..1fc03f7 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,2 +1,3 @@ +freezegun git+https://github.com/coopiteasy/addons@12.0#subdirectory=setup/resource_work_time_from_contracts git+https://github.com/coopiteasy/addons@12.0#subdirectory=setup/company_today From 5689d07dfc1c34c3baab2bbe364be6aa4f282302 Mon Sep 17 00:00:00 2001 From: hugues de keyzer Date: Fri, 11 Oct 2024 11:43:15 +0200 Subject: [PATCH 6/6] [FIX] fix test dependencies --- test-requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test-requirements.txt b/test-requirements.txt index 1fc03f7..5a43aed 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,4 @@ freezegun +git+https://github.com/coopiteasy/timesheet.git@12.0-backport-refactor-begin-end#subdirectory=setup/hr_timesheet_activity_begin_end git+https://github.com/coopiteasy/addons@12.0#subdirectory=setup/resource_work_time_from_contracts git+https://github.com/coopiteasy/addons@12.0#subdirectory=setup/company_today