Skip to content

Commit 194b7ec

Browse files
committed
[IMP] dms: pre-commit auto fixes
Signed-off-by: Daniel Kendall <dkendall@ledoweb.com>
1 parent e4986d6 commit 194b7ec

6 files changed

Lines changed: 20 additions & 19 deletions

File tree

dms/README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Document Management System
2121
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
2222
:alt: License: LGPL-3
2323
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdms-lightgray.png?logo=github
24-
:target: https://github.com/OCA/dms/tree/18.0/dms
24+
:target: https://github.com/OCA/dms/tree/19.0/dms
2525
:alt: OCA/dms
2626
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27-
:target: https://translation.odoo-community.org/projects/dms-18-0/dms-18-0-dms
27+
:target: https://translation.odoo-community.org/projects/dms-19-0/dms-19-0-dms
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/dms&target_branch=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/dms&target_branch=19.0
3131
:alt: Try me on Runboat
3232

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

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

@@ -248,6 +248,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
248248
mission is to support the collaborative development of Odoo features and
249249
promote its widespread use.
250250

251-
This module is part of the `OCA/dms <https://github.com/OCA/dms/tree/18.0/dms>`_ project on GitHub.
251+
This module is part of the `OCA/dms <https://github.com/OCA/dms/tree/19.0/dms>`_ project on GitHub.
252252

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

dms/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"name": "Document Management System",
77
"summary": """Document Management System for Odoo""",
8-
"version": "18.0.1.0.8",
8+
"version": "19.0.1.0.0",
99
"category": "Document Management",
1010
"license": "LGPL-3",
1111
"website": "https://github.com/OCA/dms",

dms/controllers/portal.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import base64
55
from typing import Optional # noqa # pylint: disable=unused-import
66

7-
from odoo import _, http
7+
from odoo import http
8+
from odoo.fields import Domain
89
from odoo.http import content_disposition, request
9-
from odoo.osv.expression import OR
1010

1111
from odoo.addons.portal.controllers.portal import CustomerPortal
1212
from odoo.addons.web.controllers.utils import ensure_db
@@ -64,12 +64,12 @@ def portal_my_dms(
6464
sortby,
6565
) = self._searchbar_data(filterby, sortby)
6666
# domain
67-
domain = [
68-
("id", "in", request.env["dms.directory"]._get_own_root_directories()),
69-
]
67+
domain = Domain(
68+
[("id", "in", request.env["dms.directory"]._get_own_root_directories())]
69+
)
7070
# search
7171
if search and search_in == "name":
72-
domain += OR([[], [("name", "ilike", search)]])
72+
domain = Domain.AND([domain, Domain.OR([[], [("name", "ilike", search)]])])
7373
# content according to pager and archive selected
7474
items = request.env["dms.directory"].search(domain, order=sort_order)
7575
request.session["my_dms_folder_history"] = items.ids
@@ -235,14 +235,16 @@ def _searchbar_data(self, filterby, sortby):
235235
sortby
236236
:rtype: tuple[str, dict, dict, str, str]
237237
"""
238-
searchbar_sortings = {"name": {"label": _("Name"), "order": "name asc"}}
238+
searchbar_sortings = {
239+
"name": {"label": request.env._("Name"), "order": "name asc"}
240+
}
239241
# default sortby
240242
if not sortby:
241243
sortby = "name"
242244
sort_order = searchbar_sortings[sortby]["order"]
243245
# search
244246
searchbar_inputs = {
245-
"name": {"input": "name", "label": _("Name")},
247+
"name": {"input": "name", "label": request.env._("Name")},
246248
}
247249
if not filterby:
248250
filterby = "name"

dms/static/description/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ <h1>Document Management System</h1>
374374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375375
!! source digest: sha256:451b6d4ca876833e0ac116a7abe59895abb355b15d825ea00d205611a4be8c70
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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/dms/tree/18.0/dms"><img alt="OCA/dms" src="https://img.shields.io/badge/github-OCA%2Fdms-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/dms-18-0/dms-18-0-dms"><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/dms&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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/dms/tree/19.0/dms"><img alt="OCA/dms" src="https://img.shields.io/badge/github-OCA%2Fdms-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/dms-19-0/dms-19-0-dms"><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/dms&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>DMS is a module for creating, managing and viewing document files
379379
directly within Odoo. This module is only the basis for an entire
380380
ecosystem of apps that extend and seamlessly integrate with the document
@@ -549,7 +549,7 @@ <h2><a class="toc-backref" href="#toc-entry-13">Bug Tracker</a></h2>
549549
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/dms/issues">GitHub Issues</a>.
550550
In case of trouble, please check there if your issue has already been reported.
551551
If you spotted it first, help us to smash it by providing a detailed and welcomed
552-
<a class="reference external" href="https://github.com/OCA/dms/issues/new?body=module:%20dms%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
552+
<a class="reference external" href="https://github.com/OCA/dms/issues/new?body=module:%20dms%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
553553
<p>Do not contact contributors directly about support or help with technical issues.</p>
554554
</div>
555555
<div class="section" id="credits">
@@ -610,7 +610,7 @@ <h3><a class="toc-backref" href="#toc-entry-18">Maintainers</a></h3>
610610
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
611611
mission is to support the collaborative development of Odoo features and
612612
promote its widespread use.</p>
613-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/dms/tree/18.0/dms">OCA/dms</a> project on GitHub.</p>
613+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/dms/tree/19.0/dms">OCA/dms</a> project on GitHub.</p>
614614
<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>
615615
</div>
616616
</div>

dms/test/markdown.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ for i in range(10):
5858
Now a nested list:
5959

6060
1. First, get these ingredients:
61-
6261
- carrots
6362
- celery
6463
- lentils

dms/tests/test_directory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def test_storage(self):
180180
"directory",
181181
)
182182
with self.assertRaises(
183-
UserError, msg="The storage of the root directory should " "not be changed"
183+
UserError, msg="The storage of the root directory should not be changed"
184184
):
185185
root_directory.write({"storage_id": self.new_storage.id})
186186

0 commit comments

Comments
 (0)