Skip to content

Commit 8b7e556

Browse files
committed
[MIG] maintenance_inspection: Migration to 17.0
1 parent 9c3b412 commit 8b7e556

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

maintenance_inspection/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Maintenance Inspection",
66
"summary": """
77
Allow to manage inspections inside Preventive requests""",
8-
"version": "18.0.1.0.0",
8+
"version": "17.0.1.0.0",
99
"license": "AGPL-3",
1010
"author": "Dixmit,Odoo Community Association (OCA)",
1111
"website": "https://github.com/OCA/maintenance",

maintenance_inspection/models/maintenance_equipment.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright 2023 Dixmit
22
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
33

4-
from odoo import models
4+
from odoo import Command, models
55

66

77
class MaintenanceEquipment(models.Model):
@@ -16,12 +16,10 @@ def _prepare_request_from_plan(self, maintenance_plan, next_maintenance_date):
1616
{
1717
"has_inspection": True,
1818
"inspection_line_ids": [
19-
(
20-
0,
21-
0,
19+
Command.create(
2220
{
2321
"item_id": item.id,
24-
},
22+
}
2523
)
2624
for item in maintenance_plan.inspection_item_ids
2725
],

maintenance_inspection/views/maintenance_inspection_item.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,15 @@
4747
<record model="ir.ui.view" id="maintenance_inspection_item_tree_view">
4848
<field name="model">maintenance.inspection.item</field>
4949
<field name="arch" type="xml">
50-
<list>
50+
<tree>
5151
<field name="name" />
5252
<field name="instruction" />
53-
</list>
53+
</tree>
5454
</field>
5555
</record>
5656

5757
<record model="ir.actions.act_window" id="maintenance_inspection_item_act_window">
5858
<field name="name">Inspection Item</field>
59-
<field name="path">maintenance-inspection</field>
6059
<field name="res_model">maintenance.inspection.item</field>
6160
<field name="view_mode">list,form</field>
6261
<field name="domain">[]</field>

maintenance_inspection/views/maintenance_inspection_line.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<record model="ir.ui.view" id="maintenance_inspection_line_tree_view">
8686
<field name="model">maintenance.inspection.line</field>
8787
<field name="arch" type="xml">
88-
<list editable="bottom">
88+
<tree editable="bottom">
8989
<field name="item_id" />
9090
<field name="instruction" />
9191
<field name="result_description" />
@@ -111,7 +111,7 @@
111111
icon="fa-times-circle"
112112
/>
113113
<field name="inspection_closed_at" invisible="1" />
114-
</list>
114+
</tree>
115115
</field>
116116
</record>
117117
</odoo>

0 commit comments

Comments
 (0)