mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] scrap_reason_code: pre-commit auto fixes
This commit is contained in:
@@ -17,19 +17,19 @@ Scrap Reason Code
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/stock-logistics-warehouse/tree/16.0/scrap_reason_code
|
||||
:target: https://github.com/OCA/stock-logistics-warehouse/tree/17.0/scrap_reason_code
|
||||
:alt: OCA/stock-logistics-warehouse
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-scrap_reason_code
|
||||
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-17-0/stock-logistics-warehouse-17-0-scrap_reason_code
|
||||
: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/stock-logistics-warehouse&target_branch=16.0
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&target_branch=17.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
Adds a reason code for scrapping operations and an interface for the user
|
||||
to create scrap codes
|
||||
Adds a reason code for scrapping operations and an interface for the
|
||||
user to create scrap codes
|
||||
|
||||
**Table of contents**
|
||||
|
||||
@@ -46,10 +46,15 @@ Create a required scrap reason code and provide scrap location.
|
||||
Usage
|
||||
=====
|
||||
|
||||
- Go to Inventory > Operations > Scrap
|
||||
- Create a scarp order and select reason code.
|
||||
- A scrap location will be readonly and auto fill based on selected reason
|
||||
code.
|
||||
- Go to Inventory > Operations > Scrap
|
||||
- Create a scarp order and select reason code.
|
||||
- A scrap location will be readonly and auto fill based on selected
|
||||
reason code.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
@@ -57,7 +62,7 @@ Bug Tracker
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-warehouse/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/stock-logistics-warehouse/issues/new?body=module:%20scrap_reason_code%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20scrap_reason_code%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.
|
||||
|
||||
@@ -65,30 +70,30 @@ Credits
|
||||
=======
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
-------
|
||||
|
||||
* Open Source Integrators
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
------------
|
||||
|
||||
* Michael Allen <mallen@opensourceintegrators.com>
|
||||
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
|
||||
* Balaji Kannan <bkannan@opensourceintegrators.com>
|
||||
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
|
||||
* Chandresh Thakkar <cthakkar@opensourceintegrators.com>
|
||||
* Hughes Damry <hughes.damry@acsone.eu>
|
||||
* Lois Rilo <lois.rilo@forgeflow.com>
|
||||
- Michael Allen <mallen@opensourceintegrators.com>
|
||||
- Bhavesh Odedra <bodedra@opensourceintegrators.com>
|
||||
- Balaji Kannan <bkannan@opensourceintegrators.com>
|
||||
- Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
|
||||
- Chandresh Thakkar <cthakkar@opensourceintegrators.com>
|
||||
- Hughes Damry <hughes.damry@acsone.eu>
|
||||
- Lois Rilo <lois.rilo@forgeflow.com>
|
||||
|
||||
Other credits
|
||||
~~~~~~~~~~~~~
|
||||
-------------
|
||||
|
||||
The development of this module has been financially supported by:
|
||||
|
||||
* Open Source Integrators
|
||||
- Open Source Integrators
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
-----------
|
||||
|
||||
This module is maintained by the OCA.
|
||||
|
||||
@@ -108,6 +113,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-bodedra|
|
||||
|
||||
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/16.0/scrap_reason_code>`_ project on GitHub.
|
||||
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/17.0/scrap_reason_code>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -49,7 +49,7 @@ class StockScrap(models.Model):
|
||||
)
|
||||
|
||||
def _prepare_move_values(self):
|
||||
res = super(StockScrap, self)._prepare_move_values()
|
||||
res = super()._prepare_move_values()
|
||||
res["reason_code_id"] = self.reason_code_id.id
|
||||
return res
|
||||
|
||||
@@ -70,7 +70,7 @@ class StockScrap(models.Model):
|
||||
|
||||
def write(self, vals):
|
||||
self._update_scrap_reason_code_location(vals)
|
||||
return super(StockScrap, self).write(vals)
|
||||
return super().write(vals)
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
|
||||
3
scrap_reason_code/pyproject.toml
Normal file
3
scrap_reason_code/pyproject.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
[build-system]
|
||||
requires = ["whool"]
|
||||
build-backend = "whool.buildapi"
|
||||
@@ -1,3 +1,3 @@
|
||||
Go to Inventory > Configuration > Scrap Reason Codes
|
||||
Go to Inventory \> Configuration \> Scrap Reason Codes
|
||||
|
||||
Create a required scrap reason code and provide scrap location.
|
||||
7
scrap_reason_code/readme/CONTRIBUTORS.md
Normal file
7
scrap_reason_code/readme/CONTRIBUTORS.md
Normal file
@@ -0,0 +1,7 @@
|
||||
- Michael Allen \<<mallen@opensourceintegrators.com>\>
|
||||
- Bhavesh Odedra \<<bodedra@opensourceintegrators.com>\>
|
||||
- Balaji Kannan \<<bkannan@opensourceintegrators.com>\>
|
||||
- Serpent Consulting Services Pvt. Ltd. \<<support@serpentcs.com>\>
|
||||
- Chandresh Thakkar \<<cthakkar@opensourceintegrators.com>\>
|
||||
- Hughes Damry \<<hughes.damry@acsone.eu>\>
|
||||
- Lois Rilo \<<lois.rilo@forgeflow.com>\>
|
||||
@@ -1,7 +0,0 @@
|
||||
* Michael Allen <mallen@opensourceintegrators.com>
|
||||
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
|
||||
* Balaji Kannan <bkannan@opensourceintegrators.com>
|
||||
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
|
||||
* Chandresh Thakkar <cthakkar@opensourceintegrators.com>
|
||||
* Hughes Damry <hughes.damry@acsone.eu>
|
||||
* Lois Rilo <lois.rilo@forgeflow.com>
|
||||
@@ -1,3 +1,3 @@
|
||||
The development of this module has been financially supported by:
|
||||
|
||||
* Open Source Integrators
|
||||
- Open Source Integrators
|
||||
@@ -1,2 +1,2 @@
|
||||
Adds a reason code for scrapping operations and an interface for the user
|
||||
to create scrap codes
|
||||
Adds a reason code for scrapping operations and an interface for the
|
||||
user to create scrap codes
|
||||
1
scrap_reason_code/readme/ROADMAP.md
Normal file
1
scrap_reason_code/readme/ROADMAP.md
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
- Go to Inventory > Operations > Scrap
|
||||
- Go to Inventory \> Operations \> Scrap
|
||||
- Create a scarp order and select reason code.
|
||||
- A scrap location will be readonly and auto fill based on selected reason
|
||||
code.
|
||||
- A scrap location will be readonly and auto fill based on selected
|
||||
reason code.
|
||||
@@ -369,20 +369,21 @@ ul.auto-toc {
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:2689e0bf5ae11316d48b7c179a2662765f9f8f553b04c3edb4612711a6338a39
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<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/stock-logistics-warehouse/tree/16.0/scrap_reason_code"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-scrap_reason_code"><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/stock-logistics-warehouse&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>Adds a reason code for scrapping operations and an interface for the user
|
||||
to create scrap codes</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/stock-logistics-warehouse/tree/17.0/scrap_reason_code"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-17-0/stock-logistics-warehouse-17-0-scrap_reason_code"><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/stock-logistics-warehouse&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>Adds a reason code for scrapping operations and an interface for the
|
||||
user to create scrap codes</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
|
||||
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#other-credits" id="toc-entry-7">Other credits</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-8">Maintainers</a></li>
|
||||
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-3">Known issues / Roadmap</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-4">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-5">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-6">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-7">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#other-credits" id="toc-entry-8">Other credits</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-9">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -397,28 +398,31 @@ to create scrap codes</p>
|
||||
<ul class="simple">
|
||||
<li>Go to Inventory > Operations > Scrap</li>
|
||||
<li>Create a scarp order and select reason code.</li>
|
||||
<li>A scrap location will be readonly and auto fill based on selected reason
|
||||
code.</li>
|
||||
<li>A scrap location will be readonly and auto fill based on selected
|
||||
reason code.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="known-issues-roadmap">
|
||||
<h1><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h1>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
|
||||
<h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/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/stock-logistics-warehouse/issues/new?body=module:%20scrap_reason_code%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/stock-logistics-warehouse/issues/new?body=module:%20scrap_reason_code%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">
|
||||
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
|
||||
<h1><a class="toc-backref" href="#toc-entry-5">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-6">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Open Source Integrators</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Michael Allen <<a class="reference external" href="mailto:mallen@opensourceintegrators.com">mallen@opensourceintegrators.com</a>></li>
|
||||
<li>Bhavesh Odedra <<a class="reference external" href="mailto:bodedra@opensourceintegrators.com">bodedra@opensourceintegrators.com</a>></li>
|
||||
@@ -430,14 +434,14 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="other-credits">
|
||||
<h2><a class="toc-backref" href="#toc-entry-7">Other credits</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-8">Other credits</a></h2>
|
||||
<p>The development of this module has been financially supported by:</p>
|
||||
<ul class="simple">
|
||||
<li>Open Source Integrators</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
@@ -445,7 +449,7 @@ mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||
<p><a class="reference external image-reference" href="https://github.com/bodedra"><img alt="bodedra" src="https://github.com/bodedra.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/16.0/scrap_reason_code">OCA/stock-logistics-warehouse</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/17.0/scrap_reason_code">OCA/stock-logistics-warehouse</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>
|
||||
|
||||
@@ -9,7 +9,7 @@ from odoo.tests.common import TransactionCase
|
||||
|
||||
class StockScrap(TransactionCase):
|
||||
def setUp(self):
|
||||
super(StockScrap, self).setUp()
|
||||
super().setUp()
|
||||
|
||||
self.stock_location = self.env.ref("stock.stock_location_stock")
|
||||
self.customer_location = self.env.ref("stock.stock_location_customers")
|
||||
|
||||
Reference in New Issue
Block a user