[IMP] quality_control_stock_oca: pre-commit auto fixes

This commit is contained in:
Antoni Marroig Campomar
2024-05-14 13:25:24 +02:00
parent d5050a9901
commit 980cd465bb
10 changed files with 43 additions and 40 deletions

View File

@@ -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 <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_stock_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_stock_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.
@@ -56,7 +57,7 @@ Credits
=======
Authors
~~~~~~~
-------
* OdooMRP team
* AvanzOSC
@@ -64,20 +65,20 @@ Authors
* Agile Business Group
Contributors
~~~~~~~~~~~~
------------
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
* Simone Rubino <simone.rubino@agilebg.com>
* Andrii Skrypka <andrijskrypa@ukr.net>
* Ignacio José Alés <ignacio.ales@guadaltech.es>
* Pimolnat Suntian <pimolnats@ecosoft.co.th>
* `Tecnativa <https://www.tecnativa.com>`_:
- Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
- Simone Rubino <simone.rubino@agilebg.com>
- Andrii Skrypka <andrijskrypa@ukr.net>
- Ignacio José Alés <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
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 <https://github.com/OCA/manufacture/tree/16.0/quality_control_stock_oca>`_ project on GitHub.
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/17.0/quality_control_stock_oca>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -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

View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"

View File

@@ -0,0 +1,8 @@
- Oihane Crucelaegui \<<oihanecrucelaegi@avanzosc.es>\>
- Simone Rubino \<<simone.rubino@agilebg.com>\>
- Andrii Skrypka \<<andrijskrypa@ukr.net>\>
- Ignacio José Alés \<<ignacio.ales@guadaltech.es>\>
- Pimolnat Suntian \<<pimolnats@ecosoft.co.th>\>
- [Tecnativa](https://www.tecnativa.com):
- Pedro M. Baeza
- Carlos Roca

View File

@@ -1,9 +0,0 @@
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
* Simone Rubino <simone.rubino@agilebg.com>
* Andrii Skrypka <andrijskrypa@ukr.net>
* Ignacio José Alés <ignacio.ales@guadaltech.es>
* Pimolnat Suntian <pimolnats@ecosoft.co.th>
* `Tecnativa <https://www.tecnativa.com>`_:
* Pedro M. Baeza
* Carlos Roca

View File

@@ -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.

View File

@@ -0,0 +1 @@
- Put trigger in all languages.

View File

@@ -1 +0,0 @@
* Put trigger in all languages.

View File

@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
@@ -369,8 +368,9 @@ ul.auto-toc {
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7430252681826a0a0f9a869194458e38ac20900898f0f8ff40422f13702695ee
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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_stock_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_stock_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&amp;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 defines triggers that creates inspections when stock moves are done.</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_stock_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_stock_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&amp;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 defines triggers that creates inspections when stock moves
are done.</p>
<p>It also adds some shortcuts on picking and lots to these inspections.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
@@ -396,7 +396,7 @@ ul.auto-toc {
<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_stock_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_stock_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">
@@ -432,7 +432,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_stock_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_stock_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>

View File

@@ -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"]