Skip to content

Commit 98815fb

Browse files
committed
[MIG] rma_repair: Migration to 18.0
TT57882
1 parent 8c184a4 commit 98815fb

File tree

7 files changed

+15
-20
lines changed

7 files changed

+15
-20
lines changed

rma_repair/README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ RMA Repair
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Frma-lightgray.png?logo=github
20-
:target: https://github.com/OCA/rma/tree/17.0/rma_repair
20+
:target: https://github.com/OCA/rma/tree/18.0/rma_repair
2121
:alt: OCA/rma
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/rma-17-0/rma-17-0-rma_repair
23+
:target: https://translation.odoo-community.org/projects/rma-18-0/rma-18-0-rma_repair
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/rma&target_branch=17.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/rma&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -58,7 +58,7 @@ Bug Tracker
5858
Bugs are tracked on `GitHub Issues <https://github.com/OCA/rma/issues>`_.
5959
In case of trouble, please check there if your issue has already been reported.
6060
If you spotted it first, help us to smash it by providing a detailed and welcomed
61-
`feedback <https://github.com/OCA/rma/issues/new?body=module:%20rma_repair%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
61+
`feedback <https://github.com/OCA/rma/issues/new?body=module:%20rma_repair%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
6262

6363
Do not contact contributors directly about support or help with technical issues.
6464

@@ -102,6 +102,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
102102

103103
|maintainer-peluko00|
104104

105-
This module is part of the `OCA/rma <https://github.com/OCA/rma/tree/17.0/rma_repair>`_ project on GitHub.
105+
This module is part of the `OCA/rma <https://github.com/OCA/rma/tree/18.0/rma_repair>`_ project on GitHub.
106106

107107
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

rma_repair/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "RMA Repair",
55
"summary": "Create a repair order from rma",
6-
"version": "17.0.1.0.0",
6+
"version": "18.0.1.0.0",
77
"category": "RMA",
88
"website": "https://github.com/OCA/rma",
99
"author": "Antoni Marroig, Odoo Community Association (OCA)",

rma_repair/models/repair.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ class RepairOrder(models.Model):
1515

1616
def action_view_repair_rma(self):
1717
return {
18-
"name": "RMAs - " + self.name,
18+
"name": f"RMAs - {self.name}",
1919
"type": "ir.actions.act_window",
20-
"view_mode": "tree,form",
20+
"view_mode": "list,form",
2121
"res_model": "rma",
2222
"domain": [("id", "in", self.rma_ids.ids)],
2323
}

rma_repair/tests/test_rma_repair_order.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# Copyright 2024 Antoni Marroig(APSL-Nagarro)<[email protected]>
22
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
33

4-
from odoo.tests.common import Form, TransactionCase
4+
from odoo.tests import Form
55

6+
from odoo.addons.base.tests.common import BaseCommon
67

7-
class RMARepairOrderTest(TransactionCase):
8+
9+
class RMARepairOrderTest(BaseCommon):
810
@classmethod
911
def setUpClass(cls):
1012
super().setUpClass()
1113
cls.warehouse_company = cls.env["stock.warehouse"].search(
12-
[("company_id", "=", cls.env.user.company_id.id)], limit=1
14+
[("company_id", "=", cls.env.company.id)], limit=1
1315
)
1416
cls.rma_loc = cls.warehouse_company.rma_loc_id
1517
cls.res_partner = cls.env["res.partner"].create({"name": "Test"})
@@ -102,9 +104,9 @@ def test_action_view_repair_rma(self):
102104
self.assertEqual(
103105
self.repair_order.action_view_repair_rma(),
104106
{
105-
"name": "RMAs - " + self.repair_order.name,
107+
"name": f"RMAs - {self.repair_order.name}",
106108
"type": "ir.actions.act_window",
107-
"view_mode": "tree,form",
109+
"view_mode": "list,form",
108110
"res_model": "rma",
109111
"domain": [("id", "in", self.repair_order.rma_ids.ids)],
110112
},

rma_repair/views/repair_views.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<field name="inherit_id" ref="repair.view_repair_order_form" />
99
<field name="arch" type="xml">
1010
<xpath expr="//button[@name='action_view_sale_order']" position="before">
11-
<field name="rma_ids" readonly="1" invisible="1" />
1211
<button
1312
class="oe_stat_button"
1413
name="action_view_repair_rma"

rma_repair/views/rma_operation.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,16 @@
22
<!-- Copyright 2025 ACSONE SA/NV
33
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
44
<odoo>
5-
65
<record id="rma_operation_form_view" model="ir.ui.view">
76
<field name="model">rma.operation</field>
87
<field name="inherit_id" ref="rma.rma_operation_form_view" />
98
<field name="arch" type="xml">
109
<xpath expr="//group[@name='settings']" position="inside">
1110
<group>
1211
<field name="action_create_repair" />
13-
1412
</group>
1513
<group />
1614
</xpath>
1715
</field>
1816
</record>
19-
20-
21-
2217
</odoo>

rma_repair/views/rma_views.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
/>
2020
</xpath>
2121
<xpath expr="//button[@name='action_view_receipt']" position="before">
22-
<field name="repair_id" readonly="1" invisible="1" />
2322
<button
2423
class="oe_stat_button"
2524
name="action_view_rma_repair_order"

0 commit comments

Comments
 (0)