Skip to content

Commit

Permalink
[IMP] maintenance_request_repair: pre-commit auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
peluko00 committed Jun 28, 2024
1 parent df5e5c7 commit cde6696
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 37 deletions.
32 changes: 16 additions & 16 deletions maintenance_request_repair/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Maintenance Request Repair
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmaintenance-lightgray.png?logo=github
:target: https://github.com/OCA/maintenance/tree/16.0/maintenance_request_repair
:target: https://github.com/OCA/maintenance/tree/17.0/maintenance_request_repair
:alt: OCA/maintenance
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/maintenance-16-0/maintenance-16-0-maintenance_request_repair
:target: https://translation.odoo-community.org/projects/maintenance-17-0/maintenance-17-0-maintenance_request_repair
: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/maintenance&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/maintenance&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -34,7 +34,7 @@ This module contains some new features for Maintenance modules.

Maintenance Request

- Repair Order: add a field to link a specific repair order.
- Repair Order: add a field to link a specific repair order.

**Table of contents**

Expand All @@ -46,39 +46,39 @@ Usage

Maintenance Request Repair

* Go to Repair → create a new one
* Go to Maintenance → Maintenance Requests
* Edit a Maintenance Request
* Select a Repair Order on the list
- Go to Repair → create a new one
- Go to Maintenance → Maintenance Requests
- Edit a Maintenance Request
- Select a Repair Order on the list

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/maintenance/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/maintenance/issues/new?body=module:%20maintenance_request_repair%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/maintenance/issues/new?body=module:%20maintenance_request_repair%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
~~~~~~~
-------

* Escodoo

Contributors
~~~~~~~~~~~~
------------

* `Escodoo <https://www.escodoo.com.br>`_:
- `Escodoo <https://www.escodoo.com.br>`__:

* Marcel Savegnago <marcel.savegnago@escodoo.com.br>
* Kaynnan Lemes <kaynnan.lemes@escodoo.com.br>
- Marcel Savegnago <marcel.savegnago@escodoo.com.br>
- Kaynnan Lemes <kaynnan.lemes@escodoo.com.br>

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -90,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/maintenance <https://github.com/OCA/maintenance/tree/16.0/maintenance_request_repair>`_ project on GitHub.
This module is part of the `OCA/maintenance <https://github.com/OCA/maintenance/tree/17.0/maintenance_request_repair>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 0 additions & 1 deletion maintenance_request_repair/models/maintenance_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class MaintenanceRequest(models.Model):

_inherit = "maintenance.request"

repair_order_id = fields.Many2one("repair.order", "Repair Order")
1 change: 0 additions & 1 deletion maintenance_request_repair/models/repair_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class RepairOrder(models.Model):

_inherit = "repair.order"

maintenance_request_ids = fields.One2many(
Expand Down
3 changes: 3 additions & 0 deletions maintenance_request_repair/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions maintenance_request_repair/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [Escodoo](https://www.escodoo.com.br):
- Marcel Savegnago \<<marcel.savegnago@escodoo.com.br>\>
- Kaynnan Lemes \<<kaynnan.lemes@escodoo.com.br>\>
4 changes: 0 additions & 4 deletions maintenance_request_repair/readme/CONTRIBUTORS.rst

This file was deleted.

6 changes: 6 additions & 0 deletions maintenance_request_repair/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Maintenance Request Repair

- Go to Repair → create a new one
- Go to Maintenance → Maintenance Requests
- Edit a Maintenance Request
- Select a Repair Order on the list
6 changes: 0 additions & 6 deletions maintenance_request_repair/readme/USAGE.rst

This file was deleted.

7 changes: 3 additions & 4 deletions maintenance_request_repair/static/description/index.html
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -369,7 +368,7 @@ <h1 class="title">Maintenance Request Repair</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:4b95990a479f9ac54500dccd7fb60653d39802d8cbb4e7c800115b5b040cb878
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/maintenance/tree/16.0/maintenance_request_repair"><img alt="OCA/maintenance" src="https://img.shields.io/badge/github-OCA%2Fmaintenance-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/maintenance-16-0/maintenance-16-0-maintenance_request_repair"><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/maintenance&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><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/maintenance/tree/17.0/maintenance_request_repair"><img alt="OCA/maintenance" src="https://img.shields.io/badge/github-OCA%2Fmaintenance-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/maintenance-17-0/maintenance-17-0-maintenance_request_repair"><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/maintenance&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 is a bridge module between Maintenance and Repair</p>
<p>This module contains some new features for Maintenance modules.</p>
<p>Maintenance Request</p>
Expand Down Expand Up @@ -404,7 +403,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/maintenance/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/maintenance/issues/new?body=module:%20maintenance_request_repair%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/maintenance/issues/new?body=module:%20maintenance_request_repair%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">
Expand Down Expand Up @@ -432,7 +431,7 @@ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<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/maintenance/tree/16.0/maintenance_request_repair">OCA/maintenance</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/maintenance/tree/17.0/maintenance_request_repair">OCA/maintenance</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>
Expand Down
6 changes: 1 addition & 5 deletions maintenance_request_repair/tests/test_repair_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class TestRepairOrder(common.TransactionCase):
def setUp(self):
super(TestRepairOrder, self).setUp()
super().setUp()

self.product = self.env["product.product"].create(
{
Expand Down Expand Up @@ -59,7 +59,6 @@ def test_compute_maintenance_request_count(self):
assert self.repair_order.maintenance_request_count == 2

def test_action_view_maintenance_request(self):

self.result = self.repair_order.with_user(
self.env.user
).action_view_maintenance_request()
Expand All @@ -73,7 +72,6 @@ def test_action_view_maintenance_request(self):
"maintenance_request_ids"
)
with self.subTest("Choose the view_mode accordingly"):

with self.subTest(
"Check maintenance_request_ids > 1 OR not self.maintenance_request_ids"
):
Expand All @@ -96,13 +94,11 @@ def test_action_view_maintenance_request(self):
self.result = self.repair_order.action_view_maintenance_request()

with self.subTest("Check maintenance_request_ids == 1"):

self.assertEqual(len(self.maintenance_request_ids), 1)
res = self.env.ref("maintenance.hr_equipment_request_view_form", False)
form_view = [(res and res.id or False, "form")]

with self.subTest("Check view in result"):

self.assertIn("views", self.result)
self.result["views"] = form_view + [
(state, view)
Expand Down

0 comments on commit cde6696

Please sign in to comment.