From 41b53c512d9926cb388a90d67e6cc7c80dd43ab8 Mon Sep 17 00:00:00 2001 From: jmartinacu Date: Wed, 22 Jan 2025 17:54:19 +0100 Subject: [PATCH] [IMP] : pre-commit auto fixes --- document_quick_access/README.rst | 10 +++++----- .../models/document_quick_access_rule.py | 12 ++++++------ document_quick_access/static/description/index.html | 6 +++--- requirements.txt | 3 +++ 4 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 requirements.txt diff --git a/document_quick_access/README.rst b/document_quick_access/README.rst index 98aa91efcf..7584c3af7d 100644 --- a/document_quick_access/README.rst +++ b/document_quick_access/README.rst @@ -17,13 +17,13 @@ Document Quick Access :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github - :target: https://github.com/OCA/server-ux/tree/17.0/document_quick_access + :target: https://github.com/OCA/server-ux/tree/18.0/document_quick_access :alt: OCA/server-ux .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-ux-17-0/server-ux-17-0-document_quick_access + :target: https://translation.odoo-community.org/projects/server-ux-18-0/server-ux-18-0-document_quick_access :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/server-ux&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-ux&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -63,7 +63,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -104,6 +104,6 @@ Current `maintainer `__: |maintainer-etobella| -This module is part of the `OCA/server-ux `_ project on GitHub. +This module is part of the `OCA/server-ux `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/document_quick_access/models/document_quick_access_rule.py b/document_quick_access/models/document_quick_access_rule.py index 9a37d32d64..8a1af0748a 100644 --- a/document_quick_access/models/document_quick_access_rule.py +++ b/document_quick_access/models/document_quick_access_rule.py @@ -29,12 +29,12 @@ class DocumentQuickAccessRule(models.Model): def get_code(self, record): self.ensure_one() - return getattr(self, "_get_code_%s" % self.barcode_format)(record) + return getattr(self, f"_get_code_{self.barcode_format}")(record) def _get_code_b64_standard(self, record): - return base64.b64encode(self._get_code_standard(record).encode("utf-8")).decode( - "utf-8" - ) + return base64.b64encode( + self._get_code_standard(record).encode("utf-8"), + ).decode("utf-8") def _get_code_standard(self, record): return f"{record._name},{record.id}" @@ -90,8 +90,8 @@ def read_code_action(self, code): def read_code(self, code): formats = self._fields["barcode_format"].selection for barcode_format, _format_name in formats: - if getattr(self, "_check_code_%s" % barcode_format)(code): - record = getattr(self, "_read_code_%s" % barcode_format)(code) + if getattr(self, f"_check_code_{barcode_format}")(code): + record = getattr(self, f"_read_code_{barcode_format}")(code) if record and self.search( [ ("model_id.model", "=", record._name), diff --git a/document_quick_access/static/description/index.html b/document_quick_access/static/description/index.html index 2a659c37d1..21fa25c520 100644 --- a/document_quick_access/static/description/index.html +++ b/document_quick_access/static/description/index.html @@ -369,7 +369,7 @@

Document Quick Access

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:60573be03baaa32601fb6a0a4bf5281e95aa17a7e9c77d1db074ea4d78f09fd2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/server-ux Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/server-ux Translate me on Weblate Try me on Runboat

This module allows to search any kind of records through a launcher. With this, we can add a QR in our reports in order to search elements faster. It could be used to add this QR (on a label) on external @@ -412,7 +412,7 @@

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.

+feedback.

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

@@ -444,7 +444,7 @@

Maintainers

promote its widespread use.

Current maintainer:

etobella

-

This module is part of the OCA/server-ux project on GitHub.

+

This module is part of the OCA/server-ux project on GitHub.

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

diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000..2186a97932 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +# generated from manifests external_dependencies +pdf2image +pyzbar