Skip to content

Commit 3af5d4e

Browse files
committed
[MIG] hr_timesheet_calendar: Migration to 18.0
1 parent 62405cc commit 3af5d4e

10 files changed

+21
-23
lines changed

hr_timesheet_calendar/README.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ HR Timesheet Calendar
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github
20-
:target: https://github.com/OCA/timesheet/tree/17.0/hr_timesheet_calendar
20+
:target: https://github.com/OCA/timesheet/tree/18.0/hr_timesheet_calendar
2121
:alt: OCA/timesheet
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/timesheet-17-0/timesheet-17-0-hr_timesheet_calendar
23+
:target: https://translation.odoo-community.org/projects/timesheet-18-0/timesheet-18-0-hr_timesheet_calendar
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/timesheet&target_branch=17.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/timesheet&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -45,7 +45,7 @@ Bug Tracker
4545
Bugs are tracked on `GitHub Issues <https://github.com/OCA/timesheet/issues>`_.
4646
In case of trouble, please check there if your issue has already been reported.
4747
If you spotted it first, help us to smash it by providing a detailed and welcomed
48-
`feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_calendar%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
48+
`feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_calendar%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
4949

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

@@ -63,11 +63,11 @@ Contributors
6363

6464
[APSL-Nagarro](https://apsl.tech):
6565

66-
- Lansana Barry Sow <[email protected]>
66+
- Lansana Barry Sow <[email protected]>
6767

6868
[glueckkanja AG](https://glueckkanja.com):
6969

70-
- Christopher Rogos <[email protected]>
70+
- Christopher Rogos <[email protected]>
7171

7272
Maintainers
7373
-----------
@@ -90,6 +90,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
9090

9191
|maintainer-lbarry-apsl|
9292

93-
This module is part of the `OCA/timesheet <https://github.com/OCA/timesheet/tree/17.0/hr_timesheet_calendar>`_ project on GitHub.
93+
This module is part of the `OCA/timesheet <https://github.com/OCA/timesheet/tree/18.0/hr_timesheet_calendar>`_ project on GitHub.
9494

9595
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

hr_timesheet_calendar/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
33
{
44
"name": "HR Timesheet Calendar",
5-
"version": "17.0.1.0.0",
5+
"version": "18.0.1.0.0",
66
"category": "Human Resources",
77
"website": "https://github.com/OCA/timesheet",
88
"author": "Lansana Barry Sow, APSL-Nagarro, Odoo Community Association (OCA)",

hr_timesheet_calendar/static/description/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ <h1 class="title">HR Timesheet Calendar</h1>
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370370
!! source digest: sha256:fb7b583d6f0a45f1eddc4b83948e103a969ad3b619626e27f53019ed597d0001
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/timesheet/tree/17.0/hr_timesheet_calendar"><img alt="OCA/timesheet" src="https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/timesheet-17-0/timesheet-17-0-hr_timesheet_calendar"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/timesheet&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/timesheet/tree/18.0/hr_timesheet_calendar"><img alt="OCA/timesheet" src="https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/timesheet-18-0/timesheet-18-0-hr_timesheet_calendar"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/timesheet&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>This module allows you to have the calendar view to show or perform time
374374
imputation.</p>
375375
<p>This module depends on the project_timesheet_time_control module from
@@ -391,7 +391,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
391391
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/timesheet/issues">GitHub Issues</a>.
392392
In case of trouble, please check there if your issue has already been reported.
393393
If you spotted it first, help us to smash it by providing a detailed and welcomed
394-
<a class="reference external" href="https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_calendar%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
394+
<a class="reference external" href="https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_calendar%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
395395
<p>Do not contact contributors directly about support or help with technical issues.</p>
396396
</div>
397397
<div class="section" id="credits">
@@ -425,7 +425,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
425425
promote its widespread use.</p>
426426
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
427427
<p><a class="reference external image-reference" href="https://github.com/lbarry-apsl"><img alt="lbarry-apsl" src="https://github.com/lbarry-apsl.png?size=40px" /></a></p>
428-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/timesheet/tree/17.0/hr_timesheet_calendar">OCA/timesheet</a> project on GitHub.</p>
428+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/timesheet/tree/18.0/hr_timesheet_calendar">OCA/timesheet</a> project on GitHub.</p>
429429
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
430430
</div>
431431
</div>

hr_timesheet_calendar/static/src/views/timesheet_calendar/common/timesheet_calendar_common_popover.esm.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/** @odoo-module **/
2-
31
import {CalendarCommonPopover} from "@web/views/calendar/calendar_common/calendar_common_popover";
42

53
export class TimesheetCalendarCommonPopover extends CalendarCommonPopover {

hr_timesheet_calendar/static/src/views/timesheet_calendar/common/timesheet_calendar_common_renderer.esm.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/** @odoo-module **/
2-
31
import {CalendarCommonRenderer} from "@web/views/calendar/calendar_common/calendar_common_renderer";
42
import {TimesheetCalendarCommonPopover} from "@hr_timesheet_calendar/views/timesheet_calendar/common/timesheet_calendar_common_popover.esm";
53

hr_timesheet_calendar/static/src/views/timesheet_calendar/timesheet_calendar_controller.esm.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/** @odoo-module **/
2-
31
import {CalendarController} from "@web/views/calendar/calendar_controller";
42
import {FormViewDialog} from "@web/views/view_dialogs/form_view_dialog";
53
import {_t} from "@web/core/l10n/translation";
@@ -64,7 +62,7 @@ export class TimesheetCalendarController extends CalendarController {
6462
this.model.load();
6563
})
6664
.catch((error) => {
67-
console.error("Unlink error:", error);
65+
this.logger.error("Unlink error:", error);
6866
reject(error);
6967
});
7068
} else {

hr_timesheet_calendar/static/src/views/timesheet_calendar/timesheet_calendar_renderer.esm.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/** @odoo-module **/
2-
31
import {CalendarRenderer} from "@web/views/calendar/calendar_renderer";
42
import {TimesheetCalendarCommonRenderer} from "@hr_timesheet_calendar/views/timesheet_calendar/common/timesheet_calendar_common_renderer.esm";
53

hr_timesheet_calendar/static/src/views/timesheet_calendar/timesheet_calendar_view.esm.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/** @odoo-module **/
2-
31
import {TimesheetCalendarController} from "@hr_timesheet_calendar/views/timesheet_calendar/timesheet_calendar_controller.esm";
42
import {TimesheetCalendarRenderer} from "@hr_timesheet_calendar/views/timesheet_calendar/timesheet_calendar_renderer.esm";
53
import {calendarView} from "@web/views/calendar/calendar_view";

hr_timesheet_calendar/tests/test_account_analytic_line.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ def setUpClass(cls):
1111
super().setUpClass()
1212
cls.analytic_line_model = cls.env["account.analytic.line"]
1313
cls.test_user = cls.env.ref("base.user_admin")
14+
cls.project = cls.env.ref("project.project_home_construction")
15+
cls.employee = cls.env.ref("hr.employee_admin")
1416

1517
@freeze_time("2025-04-03")
1618
def test_duplicate_today(self):
@@ -21,6 +23,9 @@ def test_duplicate_today(self):
2123
"date": date(2025, 4, 2),
2224
"date_time": datetime(2025, 4, 2, 9, 0),
2325
"date_time_end": datetime(2025, 4, 2, 17, 0),
26+
"project_id": self.project.id,
27+
"account_id": self.project.account_id,
28+
"employee_id": self.employee.id,
2429
}
2530
)
2631

@@ -46,6 +51,9 @@ def test_duplicate_today_no_end(self):
4651
"name": "Test Analytic Line",
4752
"date": date(2025, 4, 2),
4853
"date_time": datetime(2025, 4, 2, 9, 0),
54+
"project_id": self.project.id,
55+
"account_id": self.project.account_id,
56+
"employee_id": self.employee.id,
4957
}
5058
)
5159

hr_timesheet_calendar/views/hr_timesheet_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<odoo>
33
<record id="hr_timesheet.act_hr_timesheet_line" model="ir.actions.act_window">
4-
<field name="view_mode">tree,form,kanban,pivot,graph,calendar</field>
4+
<field name="view_mode">list,form,kanban,pivot,graph,calendar</field>
55
</record>
66

77
<record id="hr_timesheet_line_calendar" model="ir.ui.view">

0 commit comments

Comments
 (0)