Skip to content

Commit 89a858f

Browse files
[MIG] maintenance_plan: Migration to 16.0
1 parent 301527d commit 89a858f

File tree

7 files changed

+42
-42
lines changed

7 files changed

+42
-42
lines changed

maintenance_plan/README.rst

+8-7
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ Maintenance Plan
1414
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1515
:alt: License: AGPL-3
1616
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmaintenance-lightgray.png?logo=github
17-
:target: https://github.com/OCA/maintenance/tree/15.0/maintenance_plan
17+
:target: https://github.com/OCA/maintenance/tree/16.0/maintenance_plan
1818
:alt: OCA/maintenance
1919
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20-
:target: https://translation.odoo-community.org/projects/maintenance-15-0/maintenance-15-0-maintenance_plan
20+
:target: https://translation.odoo-community.org/projects/maintenance-16-0/maintenance-16-0-maintenance_plan
2121
:alt: Translate me on Weblate
22-
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23-
:target: https://runbot.odoo-community.org/runbot/240/15.0
24-
:alt: Try me on Runbot
22+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
23+
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/maintenance&target_branch=16.0
24+
:alt: Try me on Runboat
2525

2626
|badge1| |badge2| |badge3| |badge4| |badge5|
2727

@@ -85,7 +85,7 @@ Bug Tracker
8585
Bugs are tracked on `GitHub Issues <https://github.com/OCA/maintenance/issues>`_.
8686
In case of trouble, please check there if your issue has already been reported.
8787
If you spotted it first, help us smashing it by providing a detailed and welcomed
88-
`feedback <https://github.com/OCA/maintenance/issues/new?body=module:%20maintenance_plan%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
88+
`feedback <https://github.com/OCA/maintenance/issues/new?body=module:%20maintenance_plan%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
8989

9090
Do not contact contributors directly about support or help with technical issues.
9191

@@ -107,6 +107,7 @@ Contributors
107107
* Adrià Gil Sorribes <adria.gil@forgeflow.com>
108108
* Jordi Ballester Alomar <jordi.ballester@forgeflow.com>
109109
* Lois Rilo <lois.rilo@forgeflow.com>
110+
* Alexei Rivera <arivera@archeti.com>
110111

111112
Maintainers
112113
~~~~~~~~~~~
@@ -121,6 +122,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
121122
mission is to support the collaborative development of Odoo features and
122123
promote its widespread use.
123124

124-
This module is part of the `OCA/maintenance <https://github.com/OCA/maintenance/tree/15.0/maintenance_plan>`_ project on GitHub.
125+
This module is part of the `OCA/maintenance <https://github.com/OCA/maintenance/tree/16.0/maintenance_plan>`_ project on GitHub.
125126

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

maintenance_plan/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Maintenance Plan",
55
"summary": "Extends preventive maintenance planning",
6-
"version": "15.0.1.7.0",
6+
"version": "16.0.1.0.0",
77
"author": "Camptocamp SA, ForgeFlow, Odoo Community Association (OCA)",
88
"license": "AGPL-3",
99
"category": "Maintenance",

maintenance_plan/readme/CONTRIBUTORS.rst

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
* Adrià Gil Sorribes <adria.gil@forgeflow.com>
55
* Jordi Ballester Alomar <jordi.ballester@forgeflow.com>
66
* Lois Rilo <lois.rilo@forgeflow.com>
7+
* Alexei Rivera <arivera@archeti.com>

maintenance_plan/static/description/index.html

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6-
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
6+
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
77
<title>Maintenance Plan</title>
88
<style type="text/css">
99

@@ -367,7 +367,7 @@ <h1 class="title">Maintenance Plan</h1>
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
370-
<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/maintenance/tree/15.0/maintenance_plan"><img alt="OCA/maintenance" src="https://img.shields.io/badge/github-OCA%2Fmaintenance-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/maintenance-15-0/maintenance-15-0-maintenance_plan"><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/240/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
370+
<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/maintenance/tree/16.0/maintenance_plan"><img alt="OCA/maintenance" src="https://img.shields.io/badge/github-OCA%2Fmaintenance-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/maintenance-16-0/maintenance-16-0-maintenance_plan"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runboat.odoo-community.org/webui/builds.html?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>
371371
<p>This module extends the functionality of Odoo Maintenance module by allowing
372372
an equipment to have different preventive maintenance kinds.</p>
373373
<p><strong>Table of contents</strong></p>
@@ -427,7 +427,7 @@ <h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
427427
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/maintenance/issues">GitHub Issues</a>.
428428
In case of trouble, please check there if your issue has already been reported.
429429
If you spotted it first, help us smashing it by providing a detailed and welcomed
430-
<a class="reference external" href="https://github.com/OCA/maintenance/issues/new?body=module:%20maintenance_plan%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
430+
<a class="reference external" href="https://github.com/OCA/maintenance/issues/new?body=module:%20maintenance_plan%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
431431
<p>Do not contact contributors directly about support or help with technical issues.</p>
432432
</div>
433433
<div class="section" id="credits">
@@ -448,6 +448,7 @@ <h2><a class="toc-backref" href="#id6">Contributors</a></h2>
448448
<li>Adrià Gil Sorribes &lt;<a class="reference external" href="mailto:adria.gil&#64;forgeflow.com">adria.gil&#64;forgeflow.com</a>&gt;</li>
449449
<li>Jordi Ballester Alomar &lt;<a class="reference external" href="mailto:jordi.ballester&#64;forgeflow.com">jordi.ballester&#64;forgeflow.com</a>&gt;</li>
450450
<li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;forgeflow.com">lois.rilo&#64;forgeflow.com</a>&gt;</li>
451+
<li>Alexei Rivera &lt;<a class="reference external" href="mailto:arivera&#64;archeti.com">arivera&#64;archeti.com</a>&gt;</li>
451452
</ul>
452453
</div>
453454
<div class="section" id="maintainers">
@@ -457,7 +458,7 @@ <h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
457458
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
458459
mission is to support the collaborative development of Odoo features and
459460
promote its widespread use.</p>
460-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/maintenance/tree/15.0/maintenance_plan">OCA/maintenance</a> project on GitHub.</p>
461+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/maintenance/tree/16.0/maintenance_plan">OCA/maintenance</a> project on GitHub.</p>
461462
<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>
462463
</div>
463464
</div>

maintenance_plan/tests/test_maintenance_plan.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,10 @@ def test_maintenance_request_report(self):
228228
limit=1,
229229
)
230230
generated_request.note = "TEST-INSTRUCTIONS"
231-
res = self.report_obj._get_report_from_name(
232-
"base_maintenance.report_maintenance_request"
233-
)._render_qweb_text(generated_request.ids, False)
234-
self.assertRegex(str(res[0]), "TEST-INSTRUCTIONS")
231+
rendering, qweb_type = self.report_obj._render_qweb_text(
232+
"base_maintenance.report_maintenance_request", generated_request.ids
233+
)
234+
self.assertFalse(rendering.decode("utf-8").find("TEST-INSTRUCTIONS") == -1)
235235

236236
def test_maintenance_plan_button_manual_request_generation(self):
237237
self.assertEqual(len(self.maintenance_plan_1.maintenance_ids), 0)

maintenance_plan/views/maintenance_equipment_views.xml

+22-25
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,28 @@
2323
<xpath expr="//group[@name='maintenance']" position="attributes">
2424
<attribute name="attrs">{'invisible': 1}</attribute>
2525
</xpath>
26-
<xpath expr="//group[@name='maintenance']" position="after">
27-
<group name="maintenance_plans" colspan="4">
28-
<field
29-
name="maintenance_plan_ids"
30-
nolabel="1"
31-
context="{'default_equipment_id': active_id, 'hide_equipment_id': 1}"
32-
>
33-
<tree>
34-
<field name="maintenance_kind_id" string="Kind" />
35-
<field name="maintenance_team_id" string="Team" />
36-
<field name="name" />
37-
<field name="start_maintenance_date" string="Start Date" />
38-
<field name="interval" />
39-
<field name="interval_step" />
40-
<field name="duration" />
41-
<field name="next_maintenance_date" />
42-
<field
43-
name="maintenance_plan_horizon"
44-
string="P. Horizon period"
45-
/>
46-
<field name="planning_step" string="P. Horizon step" />
47-
</tree>
48-
</field>
49-
</group>
26+
<xpath expr="//group[@name='maintenance']/.." position="after">
27+
<field
28+
name="maintenance_plan_ids"
29+
nolabel="1"
30+
context="{'default_equipment_id': active_id, 'hide_equipment_id': 1}"
31+
>
32+
<tree>
33+
<field name="maintenance_kind_id" string="Kind" />
34+
<field name="maintenance_team_id" string="Team" />
35+
<field name="name" />
36+
<field name="start_maintenance_date" string="Start Date" />
37+
<field name="interval" />
38+
<field name="interval_step" />
39+
<field name="duration" />
40+
<field name="next_maintenance_date" />
41+
<field
42+
name="maintenance_plan_horizon"
43+
string="P. Horizon period"
44+
/>
45+
<field name="planning_step" string="P. Horizon step" />
46+
</tree>
47+
</field>
5048
</xpath>
5149
<field name="maintenance_team_id" position="after">
5250
<field name="maintenance_team_required" attrs="{'invisible': 1}" />
@@ -68,7 +66,6 @@
6866
<field name="maintenance_type" position="after">
6967
<field name="maintenance_kind_id" />
7068
</field>
71-
<!-- TODO: Use position="move" instead -->
7269
<xpath expr="//notebook/page[@name='description_page']" position="before">
7370
<page string="Instructions">
7471
<field

maintenance_plan/views/maintenance_plan_views.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
<field name="next_maintenance_date" />
134134
<field name="maintenance_plan_horizon" />
135135
<field name="planning_step" />
136-
<field name="active" attrs="{'invisible': True}" />
136+
<field name="active" invisible="1" />
137137
<field name="company_id" groups="base.group_multi_company" />
138138
</tree>
139139
</field>

0 commit comments

Comments
 (0)