Skip to content

Commit de6d2b8

Browse files
[MIG] base_time_window: Migration to 19.0
1 parent eba5b5c commit de6d2b8

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

base_time_window/README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Base Time Window
2121
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2222
:alt: License: AGPL-3
2323
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
24-
:target: https://github.com/OCA/server-tools/tree/18.0/base_time_window
24+
:target: https://github.com/OCA/server-tools/tree/19.0/base_time_window
2525
:alt: OCA/server-tools
2626
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27-
:target: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-base_time_window
27+
:target: https://translation.odoo-community.org/projects/server-tools-19-0/server-tools-19-0-base_time_window
2828
:alt: Translate me on Weblate
2929
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30-
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=19.0
3131
:alt: Try me on Runboat
3232

3333
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -97,7 +97,7 @@ Bug Tracker
9797
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
9898
In case of trouble, please check there if your issue has already been reported.
9999
If you spotted it first, help us to smash it by providing a detailed and welcomed
100-
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_time_window%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
100+
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_time_window%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
101101

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

@@ -147,6 +147,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
147147
mission is to support the collaborative development of Odoo features and
148148
promote its widespread use.
149149

150-
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/18.0/base_time_window>`_ project on GitHub.
150+
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/19.0/base_time_window>`_ project on GitHub.
151151

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

base_time_window/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Base Time Window",
55
"summary": "Base model to handle time windows",
6-
"version": "18.0.1.1.0",
6+
"version": "19.0.1.0.0",
77
"category": "Technical Settings",
88
"author": "ACSONE SA/NV, Camptocamp, Odoo Community Association (OCA)",
99
"license": "AGPL-3",

base_time_window/models/time_weekday.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ class TimeWeekday(models.Model):
2020
],
2121
required=True,
2222
)
23-
_sql_constraints = [("name_uniq", "UNIQUE(name)", ("Name must be unique"))]
23+
_name_uniq = models.Constraint(
24+
"UNIQUE(name)",
25+
"Name must be unique",
26+
)
2427

2528
@api.depends("name")
2629
def _compute_display_name(self):

base_time_window/models/time_window_mixin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def check_window_no_overlaps(self):
8787
@api.depends("time_window_start", "time_window_end", "time_window_weekday_ids")
8888
def _compute_display_name(self):
8989
for record in self:
90-
record.display_name = self.env._("{days}: From {start} to {end}").format(
90+
record.display_name = self.env._(
91+
"%(days)s: From %(start)s to %(end)s",
9192
days=", ".join(record.time_window_weekday_ids.mapped("display_name")),
9293
start=format_time(self.env, record.get_time_window_start_time()),
9394
end=format_time(self.env, record.get_time_window_end_time()),

base_time_window/static/description/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ <h1>Base Time Window</h1>
374374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375375
!! source digest: sha256:d2feedfba0c1f2d3ff259174ed5416d5511b53ad3c6c6c2539226e6f74823251
376376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/18.0/base_time_window"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-base_time_window"><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/server-tools&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377+
<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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/19.0/base_time_window"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-19-0/server-tools-19-0-base_time_window"><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/server-tools&amp;target_branch=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378378
<p>This module provides base classes and models to manage time windows
379379
through time.window.mixin.</p>
380380
<p><strong>Table of contents</strong></p>
@@ -445,7 +445,7 @@ <h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
445445
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>.
446446
In case of trouble, please check there if your issue has already been reported.
447447
If you spotted it first, help us to smash it by providing a detailed and welcomed
448-
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20base_time_window%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
448+
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20base_time_window%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
449449
<p>Do not contact contributors directly about support or help with technical issues.</p>
450450
</div>
451451
<div class="section" id="credits">
@@ -491,7 +491,7 @@ <h3><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h3>
491491
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
492492
mission is to support the collaborative development of Odoo features and
493493
promote its widespread use.</p>
494-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/18.0/base_time_window">OCA/server-tools</a> project on GitHub.</p>
494+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/19.0/base_time_window">OCA/server-tools</a> project on GitHub.</p>
495495
<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>
496496
</div>
497497
</div>

test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
odoo_test_helper

0 commit comments

Comments
 (0)