[IMP] rma_reason_code: pre-commit auto fixes

This commit is contained in:
Meritxell Abellan
2024-12-12 09:12:46 +01:00
parent f90bfc59ef
commit d1d42fb6d8
9 changed files with 84 additions and 102 deletions

View File

@@ -1,47 +1,61 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License LGPL-3
===============
RMA Reason Code
===============
============
RMA Put Away
============
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7fe458ca9d7af3377506c22b519e03a0a8175169e7939409a36821718e03392a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This module allows you to put away the products after you have received them.
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-ForgeFlow%2Fstock--rma-lightgray.png?logo=github
:target: https://github.com/ForgeFlow/stock-rma/tree/17.0/rma_reason_code
:alt: ForgeFlow/stock-rma
Configuration
=============
|badge1| |badge2| |badge3|
Go to *RMA / Configuration / Customer Operations* and define there:
Adds a reason code for RMA operations and an interface for the user to
create RMA codes
#. The Put Away Policy
#. The route that you wish to use to put away the products.
#. The default destination location (optional).
**Table of contents**
Usage
=====
#. Go to a Customer RMA.
#. Click on *Put Away*.
#. Indicate the quantity that you want to put away and destination location.
.. contents::
:local:
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/Eficent/stock-rma/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.
Bugs are tracked on `GitHub Issues <https://github.com/ForgeFlow/stock-rma/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/ForgeFlow/stock-rma/issues/new?body=module:%20rma_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.
Credits
=======
Authors
-------
* ForgeFlow
Contributors
------------
* Jordi Ballester Alomar <jordi.ballester@ForgeFlow.com>
* David Jimenez <david.jimenez@ForgeFlow.com>
- David Jiménez <david.jimenez@forgeflow.com>
Maintainers
-----------
Maintainer
----------
This module is part of the `ForgeFlow/stock-rma <https://github.com/ForgeFlow/stock-rma/tree/17.0/rma_reason_code>`_ project on GitHub.
This module is maintained by ForgeFlow
You are welcome to contribute.

View File

@@ -6,7 +6,7 @@
"license": "AGPL-3",
"summary": "Reason code for RMA",
"author": "ForgeFlow",
"website": "https://github.com/ForgeFlow/stock-rma",
"website": "https://github.com/ForgeFlow",
"category": "Warehouse Management",
"depends": ["rma"],
"data": [

View File

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

View File

@@ -0,0 +1 @@
- David Jiménez \<<david.jimenez@forgeflow.com>\>

View File

@@ -1 +0,0 @@
* David Jiménez <david.jimenez@forgeflow.com>

View File

@@ -1 +1,2 @@
Adds a reason code for RMA operations and an interface for the user to create RMA codes
Adds a reason code for RMA operations and an interface for the user to
create RMA codes

View File

@@ -32,7 +32,8 @@ class RmaReasonCodeReport(models.Model):
FROM
rma_order_line rma
INNER JOIN
rma_order_line_reason_code_rel rolr ON rma.id = rolr.rma_order_line_id
rma_order_line_reason_code_rel rolr
ON rma.id = rolr.rma_order_line_id
INNER JOIN
rma_reason_code rrc ON rolr.rma_reason_code_id = rrc.id
@@ -46,10 +47,8 @@ class RmaReasonCodeReport(models.Model):
@property
def _table_query(self):
return """
{_select}
{_from}
{_order_by}
""".format(
_select=self._select(), _from=self._from(), _order_by=self._order_by()
)
return f"""
{self._select()}
{self._from()}
{self._order_by()}
"""

View File

@@ -1,20 +1,19 @@
<?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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Scrap Reason Code</title>
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>RMA Reason Code</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
@@ -360,90 +359,56 @@ ul.auto-toc {
</style>
</head>
<body>
<div class="document" id="scrap-reason-code">
<h1 class="title">Scrap Reason Code</h1>
<div class="document" id="rma-reason-code">
<h1 class="title">RMA Reason Code</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7fe458ca9d7af3377506c22b519e03a0a8175169e7939409a36821718e03392a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" 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" 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" href="https://github.com/OCA/stock-logistics-warehouse/tree/14.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" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-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" href="https://runbot.odoo-community.org/runbot/153/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-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/ForgeFlow/stock-rma/tree/17.0/rma_reason_code"><img alt="ForgeFlow/stock-rma" src="https://img.shields.io/badge/github-ForgeFlow%2Fstock--rma-lightgray.png?logo=github" /></a></p>
<p>Adds a reason code for RMA operations and an interface for the user to
create RMA 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="id1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="id7">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="id8">Maintainers</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#id1">Configuration</a></h1>
<p>Go to Inventory &gt; Configuration &gt; Scrap Reason Codes</p>
<p>Create a required scrap reason code and provide scrap location.</p>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
<ul class="simple">
<li>Go to Inventory &gt; Operations &gt; 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>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id3">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>.
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/ForgeFlow/stock-rma/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 smashing 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:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/ForgeFlow/stock-rma/issues/new?body=module:%20rma_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="#id4">Credits</a></h1>
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id5">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
<ul class="simple">
<li>Open Source Integrators</li>
<li>ForgeFlow</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<ul class="simple">
<li>Michael Allen &lt;<a class="reference external" href="mailto:mallen&#64;opensourceintegrators.com">mallen&#64;opensourceintegrators.com</a>&gt;</li>
<li>Bhavesh Odedra &lt;<a class="reference external" href="mailto:bodedra&#64;opensourceintegrators.com">bodedra&#64;opensourceintegrators.com</a>&gt;</li>
<li>Balaji Kannan &lt;<a class="reference external" href="mailto:bkannan&#64;opensourceintegrators.com">bkannan&#64;opensourceintegrators.com</a>&gt;</li>
<li>Serpent Consulting Services Pvt. Ltd. &lt;<a class="reference external" href="mailto:support&#64;serpentcs.com">support&#64;serpentcs.com</a>&gt;</li>
<li>Chandresh Thakkar &lt;<a class="reference external" href="mailto:cthakkar&#64;opensourceintegrators.com">cthakkar&#64;opensourceintegrators.com</a>&gt;</li>
<li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;forgeflow.com">lois.rilo&#64;forgeflow.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#id7">Other credits</a></h2>
<p>The development of this module has been financially supported by:</p>
<ul class="simple">
<li>Open Source Integrators</li>
<li>David Jiménez &lt;<a class="reference external" href="mailto:david.jimenez&#64;forgeflow.com">david.jimenez&#64;forgeflow.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id8">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
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" 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/14.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>
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/ForgeFlow/stock-rma/tree/17.0/rma_reason_code">ForgeFlow/stock-rma</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>
</div>

View File

@@ -9,7 +9,7 @@ from odoo.tests import common
class RMAOrderLine(common.SavepointCase):
@classmethod
def setUpClass(cls):
super(RMAOrderLine, cls).setUpClass()
super().setUpClass()
cls.user_admin = cls.env.ref("base.user_admin")
cls.env = api.Environment(cls.cr, cls.user_admin.id, {})
cls.user_admin.tz = False # Make sure there's no timezone in user