Skip to content

Commit

Permalink
[MIG] hr_timesheet_overtime_begin_end: backport to 12.0
Browse files Browse the repository at this point in the history
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
  • Loading branch information
carmenbianca committed Jul 4, 2024
1 parent d9a09e8 commit f493fe5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
6 changes: 3 additions & 3 deletions hr_timesheet_overtime_begin_end/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
15 changes: 4 additions & 11 deletions hr_timesheet_overtime_begin_end/tests/test_analytic_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -34,13 +34,6 @@ 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)

0 comments on commit f493fe5

Please sign in to comment.