mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[IMP] quality_control_oca: pre-commit auto fixes
This commit is contained in:
@@ -17,20 +17,20 @@ Quality Control 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_oca
|
||||
:target: https://github.com/OCA/manufacture/tree/17.0/quality_control_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_oca
|
||||
:target: https://translation.odoo-community.org/projects/manufacture-17-0/manufacture-17-0-quality_control_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 provides a generic infrastructure for quality tests. The idea is
|
||||
that it can be later reused for doing quality inspections on production lots
|
||||
or any other area of the company.
|
||||
This module provides a generic infrastructure for quality tests. The
|
||||
idea is that it can be later reused for doing quality inspections on
|
||||
production lots or any other area of the company.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
@@ -40,37 +40,33 @@ or any other area of the company.
|
||||
Configuration
|
||||
=============
|
||||
|
||||
* Question: The thing to be checked. We have two types of questions:
|
||||
|
||||
* Qualitative: The result is a description, color, yes, no...
|
||||
|
||||
* Quantitative: The result must be within a range.
|
||||
|
||||
* Possible values: The values chosen in qualitative questions.
|
||||
|
||||
* Test: The set of questions to be used in inspections.
|
||||
|
||||
* Once these values are set, we define the inspection.
|
||||
- Question: The thing to be checked. We have two types of questions:
|
||||
- Qualitative: The result is a description, color, yes, no...
|
||||
- Quantitative: The result must be within a range.
|
||||
- Possible values: The values chosen in qualitative questions.
|
||||
- Test: The set of questions to be used in inspections.
|
||||
- Once these values are set, we define the inspection.
|
||||
|
||||
We have a *generic* test that can be applied to any model: shipments,
|
||||
invoices or product, or a *test related*, making it specific to a particular
|
||||
product and that eg apply whenever food is sold or when creating a batch.
|
||||
invoices or product, or a *test related*, making it specific to a
|
||||
particular product and that eg apply whenever food is sold or when
|
||||
creating a batch.
|
||||
|
||||
Once these parameters are set, we can just pass the test. We create a
|
||||
new inspection, selecting a relationship with the model (sale, stock move...),
|
||||
and pressing "Select test" button to choose the test to pass. Then, you must
|
||||
fill the lines depending on the chosen test.
|
||||
new inspection, selecting a relationship with the model (sale, stock
|
||||
move...), and pressing "Select test" button to choose the test to pass.
|
||||
Then, you must fill the lines depending on the chosen test.
|
||||
|
||||
The complete inspection workflow is:
|
||||
|
||||
Draft -> Confirmed -> Success
|
||||
|
|
||||
| -> Failure (Pending approval) -> Approved
|
||||
Draft -> Confirmed -> Success
|
||||
|
||||
-> Failure (Pending approval) -> Approved
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
* Make translatable the trigger name.
|
||||
- Make translatable the trigger name.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
@@ -78,7 +74,7 @@ Bug Tracker
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/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 <https://github.com/OCA/manufacture/issues/new?body=module:%20quality_control_oca%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/manufacture/issues/new?body=module:%20quality_control_oca%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
@@ -86,37 +82,39 @@ Credits
|
||||
=======
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
-------
|
||||
|
||||
* AvanzOSC
|
||||
* Tecnativa
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
------------
|
||||
|
||||
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
|
||||
* Ana Juaristi <anajuaristi@avanzosc.es>
|
||||
* Lois Rilo <lois.rilo@forgeflow.com>
|
||||
* Simone Rubino <simone.rubino@agilebg.com>
|
||||
* Juan Humanes <juan.humanes@guadaltech.es>
|
||||
* Ignacio José Alés López <ignacio.ales@guadaltech.es>
|
||||
* Pimolnat Suntian <pimolnats@ecosoft.co.th>
|
||||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
- Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
|
||||
- Ana Juaristi <anajuaristi@avanzosc.es>
|
||||
- Lois Rilo <lois.rilo@forgeflow.com>
|
||||
- Simone Rubino <simone.rubino@agilebg.com>
|
||||
- Juan Humanes <juan.humanes@guadaltech.es>
|
||||
- Ignacio José Alés López <ignacio.ales@guadaltech.es>
|
||||
- Pimolnat Suntian <pimolnats@ecosoft.co.th>
|
||||
- `Tecnativa <https://www.tecnativa.com>`__:
|
||||
|
||||
* Pedro M. Baeza
|
||||
* Carlos Roca
|
||||
- Pedro M. Baeza
|
||||
- Carlos Roca
|
||||
|
||||
* `Trey Kilobytes de Soluciones SL <https://www.trey.es>`__:
|
||||
- `Trey Kilobytes de Soluciones SL <https://www.trey.es>`__:
|
||||
|
||||
* Vicent Cubells
|
||||
- Vicent Cubells
|
||||
|
||||
Other credits
|
||||
~~~~~~~~~~~~~
|
||||
-------------
|
||||
|
||||
* Originally based on the old nan_quality_control_* modules from NaN·tic.
|
||||
- Originally based on the old
|
||||
`nan_quality_control <https://github.com/NaN-tic/nan_quality_control>`__
|
||||
modules from NaN·tic.
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
-----------
|
||||
|
||||
This module is maintained by the OCA.
|
||||
|
||||
@@ -128,6 +126,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 <https://github.com/OCA/manufacture/tree/16.0/quality_control_oca>`_ project on GitHub.
|
||||
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/17.0/quality_control_oca>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -203,9 +203,7 @@ class QcInspection(models.Model):
|
||||
:return: List of values for creating the inspection
|
||||
"""
|
||||
return {
|
||||
"object_id": object_ref
|
||||
and "{},{}".format(object_ref._name, object_ref.id)
|
||||
or False,
|
||||
"object_id": object_ref and f"{object_ref._name},{object_ref.id}" or False,
|
||||
"state": "ready",
|
||||
"test": trigger_line.test.id,
|
||||
"user": trigger_line.user.id,
|
||||
|
||||
3
quality_control_oca/pyproject.toml
Normal file
3
quality_control_oca/pyproject.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
[build-system]
|
||||
requires = ["whool"]
|
||||
build-backend = "whool.buildapi"
|
||||
22
quality_control_oca/readme/CONFIGURE.md
Normal file
22
quality_control_oca/readme/CONFIGURE.md
Normal file
@@ -0,0 +1,22 @@
|
||||
- Question: The thing to be checked. We have two types of questions:
|
||||
- Qualitative: The result is a description, color, yes, no...
|
||||
- Quantitative: The result must be within a range.
|
||||
- Possible values: The values chosen in qualitative questions.
|
||||
- Test: The set of questions to be used in inspections.
|
||||
- Once these values are set, we define the inspection.
|
||||
|
||||
We have a *generic* test that can be applied to any model: shipments,
|
||||
invoices or product, or a *test related*, making it specific to a
|
||||
particular product and that eg apply whenever food is sold or when
|
||||
creating a batch.
|
||||
|
||||
Once these parameters are set, we can just pass the test. We create a
|
||||
new inspection, selecting a relationship with the model (sale, stock
|
||||
move...), and pressing "Select test" button to choose the test to pass.
|
||||
Then, you must fill the lines depending on the chosen test.
|
||||
|
||||
The complete inspection workflow is:
|
||||
|
||||
> Draft -\> Confirmed -\> Success
|
||||
>
|
||||
> -\> Failure (Pending approval) -\> Approved
|
||||
@@ -1,26 +0,0 @@
|
||||
* Question: The thing to be checked. We have two types of questions:
|
||||
|
||||
* Qualitative: The result is a description, color, yes, no...
|
||||
|
||||
* Quantitative: The result must be within a range.
|
||||
|
||||
* Possible values: The values chosen in qualitative questions.
|
||||
|
||||
* Test: The set of questions to be used in inspections.
|
||||
|
||||
* Once these values are set, we define the inspection.
|
||||
|
||||
We have a *generic* test that can be applied to any model: shipments,
|
||||
invoices or product, or a *test related*, making it specific to a particular
|
||||
product and that eg apply whenever food is sold or when creating a batch.
|
||||
|
||||
Once these parameters are set, we can just pass the test. We create a
|
||||
new inspection, selecting a relationship with the model (sale, stock move...),
|
||||
and pressing "Select test" button to choose the test to pass. Then, you must
|
||||
fill the lines depending on the chosen test.
|
||||
|
||||
The complete inspection workflow is:
|
||||
|
||||
Draft -> Confirmed -> Success
|
||||
|
|
||||
| -> Failure (Pending approval) -> Approved
|
||||
12
quality_control_oca/readme/CONTRIBUTORS.md
Normal file
12
quality_control_oca/readme/CONTRIBUTORS.md
Normal file
@@ -0,0 +1,12 @@
|
||||
- Oihane Crucelaegui \<<oihanecrucelaegi@avanzosc.es>\>
|
||||
- Ana Juaristi \<<anajuaristi@avanzosc.es>\>
|
||||
- Lois Rilo \<<lois.rilo@forgeflow.com>\>
|
||||
- Simone Rubino \<<simone.rubino@agilebg.com>\>
|
||||
- Juan Humanes \<<juan.humanes@guadaltech.es>\>
|
||||
- Ignacio José Alés López \<<ignacio.ales@guadaltech.es>\>
|
||||
- Pimolnat Suntian \<<pimolnats@ecosoft.co.th>\>
|
||||
- [Tecnativa](https://www.tecnativa.com):
|
||||
- Pedro M. Baeza
|
||||
- Carlos Roca
|
||||
- [Trey Kilobytes de Soluciones SL](https://www.trey.es):
|
||||
- Vicent Cubells
|
||||
@@ -1,15 +0,0 @@
|
||||
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
|
||||
* Ana Juaristi <anajuaristi@avanzosc.es>
|
||||
* Lois Rilo <lois.rilo@forgeflow.com>
|
||||
* Simone Rubino <simone.rubino@agilebg.com>
|
||||
* Juan Humanes <juan.humanes@guadaltech.es>
|
||||
* Ignacio José Alés López <ignacio.ales@guadaltech.es>
|
||||
* Pimolnat Suntian <pimolnats@ecosoft.co.th>
|
||||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
|
||||
* Pedro M. Baeza
|
||||
* Carlos Roca
|
||||
|
||||
* `Trey Kilobytes de Soluciones SL <https://www.trey.es>`__:
|
||||
|
||||
* Vicent Cubells
|
||||
2
quality_control_oca/readme/CREDITS.md
Normal file
2
quality_control_oca/readme/CREDITS.md
Normal file
@@ -0,0 +1,2 @@
|
||||
- Originally based on the old [nan_quality_control](https://github.com/NaN-tic/nan_quality_control) modules from
|
||||
NaN·tic.
|
||||
@@ -1 +0,0 @@
|
||||
* Originally based on the old nan_quality_control_* modules from NaN·tic.
|
||||
3
quality_control_oca/readme/DESCRIPTION.md
Normal file
3
quality_control_oca/readme/DESCRIPTION.md
Normal file
@@ -0,0 +1,3 @@
|
||||
This module provides a generic infrastructure for quality tests. The
|
||||
idea is that it can be later reused for doing quality inspections on
|
||||
production lots or any other area of the company.
|
||||
@@ -1,3 +0,0 @@
|
||||
This module provides a generic infrastructure for quality tests. The idea is
|
||||
that it can be later reused for doing quality inspections on production lots
|
||||
or any other area of the company.
|
||||
1
quality_control_oca/readme/ROADMAP.md
Normal file
1
quality_control_oca/readme/ROADMAP.md
Normal file
@@ -0,0 +1 @@
|
||||
- Make translatable the trigger name.
|
||||
@@ -1 +0,0 @@
|
||||
* Make translatable the trigger name.
|
||||
@@ -368,10 +368,10 @@ ul.auto-toc {
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:f681e05b0e199eb1c9dc6fbaaf96e42573ad9f3de8c94fdb10219d577b0dc541
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<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/manufacture/tree/16.0/quality_control_oca"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-quality_control_oca"><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/manufacture&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module provides a generic infrastructure for quality tests. The idea is
|
||||
that it can be later reused for doing quality inspections on production lots
|
||||
or any other area of the company.</p>
|
||||
<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/manufacture/tree/17.0/quality_control_oca"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/manufacture-17-0/manufacture-17-0-quality_control_oca"><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/manufacture&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module provides a generic infrastructure for quality tests. The
|
||||
idea is that it can be later reused for doing quality inspections on
|
||||
production lots or any other area of the company.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
@@ -398,22 +398,17 @@ or any other area of the company.</p>
|
||||
<li>Once these values are set, we define the inspection.</li>
|
||||
</ul>
|
||||
<p>We have a <em>generic</em> test that can be applied to any model: shipments,
|
||||
invoices or product, or a <em>test related</em>, making it specific to a particular
|
||||
product and that eg apply whenever food is sold or when creating a batch.</p>
|
||||
invoices or product, or a <em>test related</em>, making it specific to a
|
||||
particular product and that eg apply whenever food is sold or when
|
||||
creating a batch.</p>
|
||||
<p>Once these parameters are set, we can just pass the test. We create a
|
||||
new inspection, selecting a relationship with the model (sale, stock move…),
|
||||
and pressing “Select test” button to choose the test to pass. Then, you must
|
||||
fill the lines depending on the chosen test.</p>
|
||||
new inspection, selecting a relationship with the model (sale, stock
|
||||
move…), and pressing “Select test” button to choose the test to pass.
|
||||
Then, you must fill the lines depending on the chosen test.</p>
|
||||
<p>The complete inspection workflow is:</p>
|
||||
<blockquote>
|
||||
<dl class="docutils">
|
||||
<dt>Draft -> Confirmed -> Success</dt>
|
||||
<dd><div class="first last line-block">
|
||||
<div class="line"><br /></div>
|
||||
<div class="line">-> Failure (Pending approval) -> Approved</div>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Draft -> Confirmed -> Success</p>
|
||||
<p>-> Failure (Pending approval) -> Approved</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="section" id="known-issues-roadmap">
|
||||
@@ -427,7 +422,7 @@ fill the lines depending on the chosen test.</p>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/manufacture/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/manufacture/issues/new?body=module:%20quality_control_oca%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<a class="reference external" href="https://github.com/OCA/manufacture/issues/new?body=module:%20quality_control_oca%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
@@ -463,7 +458,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<div class="section" id="other-credits">
|
||||
<h2><a class="toc-backref" href="#toc-entry-7">Other credits</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Originally based on the old nan_quality_control_* modules from NaN·tic.</li>
|
||||
<li>Originally based on the old
|
||||
<a class="reference external" href="https://github.com/NaN-tic/nan_quality_control">nan_quality_control</a>
|
||||
modules from NaN·tic.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
@@ -473,7 +470,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<p>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.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/manufacture/tree/16.0/quality_control_oca">OCA/manufacture</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/manufacture/tree/17.0/quality_control_oca">OCA/manufacture</a> project on GitHub.</p>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -129,7 +129,7 @@ class TestQualityControlOca(TestQualityControlOcaBase):
|
||||
)
|
||||
self.assertEqual(
|
||||
category2.complete_name,
|
||||
"{} / {}".format(category1.name, category2.name),
|
||||
f"{category1.name} / {category2.name}",
|
||||
"Something went wrong when computing complete name",
|
||||
)
|
||||
with self.assertRaises(exceptions.UserError):
|
||||
|
||||
Reference in New Issue
Block a user