From 980cd465bb8b7b26aa52a71dca4b63341617b8bd Mon Sep 17 00:00:00 2001 From: Antoni Marroig Campomar Date: Tue, 14 May 2024 13:25:24 +0200 Subject: [PATCH] [IMP] quality_control_stock_oca: pre-commit auto fixes --- quality_control_stock_oca/README.rst | 37 ++++++++++--------- .../models/qc_inspection.py | 5 ++- quality_control_stock_oca/pyproject.toml | 3 ++ .../readme/CONTRIBUTORS.md | 8 ++++ .../readme/CONTRIBUTORS.rst | 9 ----- .../{DESCRIPTION.rst => DESCRIPTION.md} | 3 +- quality_control_stock_oca/readme/ROADMAP.md | 1 + quality_control_stock_oca/readme/ROADMAP.rst | 1 - .../static/description/index.html | 10 ++--- .../tests/test_quality_control_stock.py | 6 +-- 10 files changed, 43 insertions(+), 40 deletions(-) create mode 100644 quality_control_stock_oca/pyproject.toml create mode 100644 quality_control_stock_oca/readme/CONTRIBUTORS.md delete mode 100644 quality_control_stock_oca/readme/CONTRIBUTORS.rst rename quality_control_stock_oca/readme/{DESCRIPTION.rst => DESCRIPTION.md} (88%) create mode 100644 quality_control_stock_oca/readme/ROADMAP.md delete mode 100644 quality_control_stock_oca/readme/ROADMAP.rst diff --git a/quality_control_stock_oca/README.rst b/quality_control_stock_oca/README.rst index 8da328bf3..e9e21ba38 100644 --- a/quality_control_stock_oca/README.rst +++ b/quality_control_stock_oca/README.rst @@ -17,18 +17,19 @@ Quality control - Stock (OCA) :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github - :target: https://github.com/OCA/manufacture/tree/16.0/quality_control_stock_oca + :target: https://github.com/OCA/manufacture/tree/17.0/quality_control_stock_oca :alt: OCA/manufacture .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-quality_control_stock_oca + :target: https://translation.odoo-community.org/projects/manufacture-17-0/manufacture-17-0-quality_control_stock_oca :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/manufacture&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module defines triggers that creates inspections when stock moves are done. +This module defines triggers that creates inspections when stock moves +are done. It also adds some shortcuts on picking and lots to these inspections. @@ -40,7 +41,7 @@ It also adds some shortcuts on picking and lots to these inspections. Known issues / Roadmap ====================== -* Put trigger in all languages. +- Put trigger in all languages. Bug Tracker =========== @@ -48,7 +49,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. @@ -56,7 +57,7 @@ Credits ======= Authors -~~~~~~~ +------- * OdooMRP team * AvanzOSC @@ -64,20 +65,20 @@ Authors * Agile Business Group Contributors -~~~~~~~~~~~~ +------------ -* Oihane Crucelaegui -* Simone Rubino -* Andrii Skrypka -* Ignacio José Alés -* Pimolnat Suntian -* `Tecnativa `_: +- Oihane Crucelaegui +- Simone Rubino +- Andrii Skrypka +- Ignacio José Alés +- Pimolnat Suntian +- `Tecnativa `__: - * Pedro M. Baeza - * Carlos Roca + - Pedro M. Baeza + - Carlos Roca Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -89,6 +90,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/manufacture `_ project on GitHub. +This module is part of the `OCA/manufacture `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/quality_control_stock_oca/models/qc_inspection.py b/quality_control_stock_oca/models/qc_inspection.py index 3a6eeb4f1..0812f4364 100644 --- a/quality_control_stock_oca/models/qc_inspection.py +++ b/quality_control_stock_oca/models/qc_inspection.py @@ -46,7 +46,10 @@ class QcInspection(models.Model): for inspection in self.filtered("object_id"): if inspection.object_id._name == "stock.move": inspection.lot_id = first( - move_lines.filtered(lambda x: x.move_id == inspection.object_id) + move_lines.filtered( + lambda x, inspection=inspection: x.move_id + == inspection.object_id + ) ).lot_id elif inspection.object_id._name == "stock.lot": inspection.lot_id = inspection.object_id diff --git a/quality_control_stock_oca/pyproject.toml b/quality_control_stock_oca/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/quality_control_stock_oca/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/quality_control_stock_oca/readme/CONTRIBUTORS.md b/quality_control_stock_oca/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..1874814be --- /dev/null +++ b/quality_control_stock_oca/readme/CONTRIBUTORS.md @@ -0,0 +1,8 @@ +- Oihane Crucelaegui \<\> +- Simone Rubino \<\> +- Andrii Skrypka \<\> +- Ignacio José Alés \<\> +- Pimolnat Suntian \<\> +- [Tecnativa](https://www.tecnativa.com): + - Pedro M. Baeza + - Carlos Roca diff --git a/quality_control_stock_oca/readme/CONTRIBUTORS.rst b/quality_control_stock_oca/readme/CONTRIBUTORS.rst deleted file mode 100644 index 42989acc3..000000000 --- a/quality_control_stock_oca/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,9 +0,0 @@ -* Oihane Crucelaegui -* Simone Rubino -* Andrii Skrypka -* Ignacio José Alés -* Pimolnat Suntian -* `Tecnativa `_: - - * Pedro M. Baeza - * Carlos Roca diff --git a/quality_control_stock_oca/readme/DESCRIPTION.rst b/quality_control_stock_oca/readme/DESCRIPTION.md similarity index 88% rename from quality_control_stock_oca/readme/DESCRIPTION.rst rename to quality_control_stock_oca/readme/DESCRIPTION.md index e1792f9cf..6ade7b64e 100644 --- a/quality_control_stock_oca/readme/DESCRIPTION.rst +++ b/quality_control_stock_oca/readme/DESCRIPTION.md @@ -1,3 +1,4 @@ -This module defines triggers that creates inspections when stock moves are done. +This module defines triggers that creates inspections when stock moves +are done. It also adds some shortcuts on picking and lots to these inspections. diff --git a/quality_control_stock_oca/readme/ROADMAP.md b/quality_control_stock_oca/readme/ROADMAP.md new file mode 100644 index 000000000..aa7e419ec --- /dev/null +++ b/quality_control_stock_oca/readme/ROADMAP.md @@ -0,0 +1 @@ +- Put trigger in all languages. diff --git a/quality_control_stock_oca/readme/ROADMAP.rst b/quality_control_stock_oca/readme/ROADMAP.rst deleted file mode 100644 index db5c65f37..000000000 --- a/quality_control_stock_oca/readme/ROADMAP.rst +++ /dev/null @@ -1 +0,0 @@ -* Put trigger in all languages. diff --git a/quality_control_stock_oca/static/description/index.html b/quality_control_stock_oca/static/description/index.html index 6291209f8..bedf9684c 100644 --- a/quality_control_stock_oca/static/description/index.html +++ b/quality_control_stock_oca/static/description/index.html @@ -1,4 +1,3 @@ - @@ -369,8 +368,9 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:7430252681826a0a0f9a869194458e38ac20900898f0f8ff40422f13702695ee !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

-

This module defines triggers that creates inspections when stock moves are done.

+

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

+

This module defines triggers that creates inspections when stock moves +are done.

It also adds some shortcuts on picking and lots to these inspections.

Table of contents

@@ -396,7 +396,7 @@ ul.auto-toc {

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.

@@ -432,7 +432,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/manufacture project on GitHub.

+

This module is part of the OCA/manufacture project on GitHub.

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

diff --git a/quality_control_stock_oca/tests/test_quality_control_stock.py b/quality_control_stock_oca/tests/test_quality_control_stock.py index f790f546f..0b573fbc0 100644 --- a/quality_control_stock_oca/tests/test_quality_control_stock.py +++ b/quality_control_stock_oca/tests/test_quality_control_stock.py @@ -41,11 +41,7 @@ class TestQualityControlStockOca(TestQualityControlOcaBase): cls.user = new_test_user( cls.env, login="test_quality_control_stock_oca", - groups="%s,%s" - % ( - "stock.group_stock_user", - "quality_control_oca.group_quality_control_user", - ), + groups=f"{'stock.group_stock_user'},{'quality_control_oca.group_quality_control_user'}", ) picking_form = Form( cls.env["stock.picking"]