From bbdfe04081c6b0d4c66f55f37a4541caf7407acf Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Mon, 18 Dec 2023 09:20:09 +0100 Subject: [PATCH 1/9] [ADD] maintenance_inspection --- maintenance_inspection/README.rst | 93 ++++ maintenance_inspection/__init__.py | 1 + maintenance_inspection/__manifest__.py | 21 + maintenance_inspection/models/__init__.py | 5 + .../models/maintenance_equipment.py | 31 ++ .../models/maintenance_inspection_item.py | 14 + .../models/maintenance_inspection_line.py | 32 ++ .../models/maintenance_plan.py | 11 + .../models/maintenance_request.py | 27 ++ .../readme/CONTRIBUTORS.rst | 1 + maintenance_inspection/readme/DESCRIPTION.rst | 4 + maintenance_inspection/readme/USAGE.rst | 10 + .../security/ir.model.access.csv | 5 + .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 436 ++++++++++++++++++ maintenance_inspection/tests/__init__.py | 1 + .../tests/test_inspection.py | 78 ++++ .../views/maintenance_inspection_item.xml | 73 +++ .../views/maintenance_inspection_line.xml | 128 +++++ .../views/maintenance_plan.xml | 18 + .../views/maintenance_request.xml | 44 ++ 21 files changed, 1033 insertions(+) create mode 100644 maintenance_inspection/README.rst create mode 100644 maintenance_inspection/__init__.py create mode 100644 maintenance_inspection/__manifest__.py create mode 100644 maintenance_inspection/models/__init__.py create mode 100644 maintenance_inspection/models/maintenance_equipment.py create mode 100644 maintenance_inspection/models/maintenance_inspection_item.py create mode 100644 maintenance_inspection/models/maintenance_inspection_line.py create mode 100644 maintenance_inspection/models/maintenance_plan.py create mode 100644 maintenance_inspection/models/maintenance_request.py create mode 100644 maintenance_inspection/readme/CONTRIBUTORS.rst create mode 100644 maintenance_inspection/readme/DESCRIPTION.rst create mode 100644 maintenance_inspection/readme/USAGE.rst create mode 100644 maintenance_inspection/security/ir.model.access.csv create mode 100644 maintenance_inspection/static/description/icon.png create mode 100644 maintenance_inspection/static/description/index.html create mode 100644 maintenance_inspection/tests/__init__.py create mode 100644 maintenance_inspection/tests/test_inspection.py create mode 100644 maintenance_inspection/views/maintenance_inspection_item.xml create mode 100644 maintenance_inspection/views/maintenance_inspection_line.xml create mode 100644 maintenance_inspection/views/maintenance_plan.xml create mode 100644 maintenance_inspection/views/maintenance_request.xml diff --git a/maintenance_inspection/README.rst b/maintenance_inspection/README.rst new file mode 100644 index 000000000..f741fa3a2 --- /dev/null +++ b/maintenance_inspection/README.rst @@ -0,0 +1,93 @@ +====================== +Maintenance Inspection +====================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:36f12f29772c69279f92e5439bd43d832a9632f9e8fbf968399855598da14453 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-OCA%2Fmaintenance-lightgray.png?logo=github + :target: https://github.com/OCA/maintenance/tree/14.0/maintenance_inspection + :alt: OCA/maintenance +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/maintenance-14-0/maintenance-14-0-maintenance_inspection + :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=14.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Add the concept of inspection items inside Maintenance requests. + +Will only be usable insidea preventive requests. + + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +On Preventive requests, we will be able to set an inspection and check some items. + +Once we close the inspection it will be no longer editable. + + +On Plans +~~~~~~~~ + +When using Maintenance Plans, we can define items to evaluate in order to generate +them automatically on maintenance creation + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Dixmit + +Contributors +~~~~~~~~~~~~ + +* Enric Tobella + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/maintenance_inspection/__init__.py b/maintenance_inspection/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/maintenance_inspection/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/maintenance_inspection/__manifest__.py b/maintenance_inspection/__manifest__.py new file mode 100644 index 000000000..e656e6629 --- /dev/null +++ b/maintenance_inspection/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2023 Dixmit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Maintenance Inspection", + "summary": """ + Allow to manage inspections inside Preventive requests""", + "version": "14.0.1.0.0", + "license": "AGPL-3", + "author": "Dixmit,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/maintenance", + "depends": ["maintenance_plan", "base_maintenance"], + "data": [ + "views/maintenance_plan.xml", + "security/ir.model.access.csv", + "views/maintenance_inspection_line.xml", + "views/maintenance_inspection_item.xml", + "views/maintenance_request.xml", + ], + "demo": [], +} diff --git a/maintenance_inspection/models/__init__.py b/maintenance_inspection/models/__init__.py new file mode 100644 index 000000000..e2af54146 --- /dev/null +++ b/maintenance_inspection/models/__init__.py @@ -0,0 +1,5 @@ +from . import maintenance_request +from . import maintenance_inspection_item +from . import maintenance_inspection_line +from . import maintenance_plan +from . import maintenance_equipment diff --git a/maintenance_inspection/models/maintenance_equipment.py b/maintenance_inspection/models/maintenance_equipment.py new file mode 100644 index 000000000..183cbc627 --- /dev/null +++ b/maintenance_inspection/models/maintenance_equipment.py @@ -0,0 +1,31 @@ +# Copyright 2023 Dixmit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import models + + +class MaintenanceEquipment(models.Model): + + _inherit = "maintenance.equipment" + + def _prepare_request_from_plan(self, maintenance_plan, next_maintenance_date): + result = super()._prepare_request_from_plan( + maintenance_plan, next_maintenance_date + ) + if maintenance_plan.inspection_item_ids: + result.update( + { + "has_inspection": True, + "inspection_line_ids": [ + ( + 0, + 0, + { + "item_id": item.id, + }, + ) + for item in maintenance_plan.inspection_item_ids + ], + } + ) + return result diff --git a/maintenance_inspection/models/maintenance_inspection_item.py b/maintenance_inspection/models/maintenance_inspection_item.py new file mode 100644 index 000000000..d86474f29 --- /dev/null +++ b/maintenance_inspection/models/maintenance_inspection_item.py @@ -0,0 +1,14 @@ +# Copyright 2023 Dixmit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class MaintenanceInspectionItem(models.Model): + + _name = "maintenance.inspection.item" + _description = "Item of evaluation" + + name = fields.Char(required=True) + instruction = fields.Text() + active = fields.Boolean(default=True) diff --git a/maintenance_inspection/models/maintenance_inspection_line.py b/maintenance_inspection/models/maintenance_inspection_line.py new file mode 100644 index 000000000..b5168609d --- /dev/null +++ b/maintenance_inspection/models/maintenance_inspection_line.py @@ -0,0 +1,32 @@ +# Copyright 2023 Dixmit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class MaintenanceInspectionLine(models.Model): + + _name = "maintenance.inspection.line" + _description = "Maintenance Inspection Line" + + request_id = fields.Many2one( + "maintenance.request", required=True, ondelete="cascade" + ) + item_id = fields.Many2one("maintenance.inspection.item", required=True) + instruction = fields.Text(related="item_id.instruction") + result = fields.Selection( + [("todo", "Todo"), ("success", "Success"), ("failure", "Failure")], + "Result", + default="todo", + readonly=True, + required=True, + copy=False, + ) + result_description = fields.Char() + inspection_closed_at = fields.Datetime(related="request_id.inspection_closed_at") + + def action_success(self): + self.write({"result": "success"}) + + def action_failure(self): + self.write({"result": "failure"}) diff --git a/maintenance_inspection/models/maintenance_plan.py b/maintenance_inspection/models/maintenance_plan.py new file mode 100644 index 000000000..073ffbaca --- /dev/null +++ b/maintenance_inspection/models/maintenance_plan.py @@ -0,0 +1,11 @@ +# Copyright 2023 Dixmit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class MaintenancePlan(models.Model): + + _inherit = "maintenance.plan" + + inspection_item_ids = fields.Many2many("maintenance.inspection.item") diff --git a/maintenance_inspection/models/maintenance_request.py b/maintenance_inspection/models/maintenance_request.py new file mode 100644 index 000000000..c464fb528 --- /dev/null +++ b/maintenance_inspection/models/maintenance_request.py @@ -0,0 +1,27 @@ +# Copyright 2023 Dixmit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class MaintenanceRequest(models.Model): + + _inherit = "maintenance.request" + + has_inspection = fields.Boolean() + inspection_line_ids = fields.One2many( + "maintenance.inspection.line", inverse_name="request_id" + ) + inspection_closed_at = fields.Datetime(readonly=True, copy=False) + inspection_closed_by = fields.Many2one("res.users", readonly=True, copy=False) + + def set_inspection(self): + self.write({"has_inspection": True}) + + def finish_inspection(self): + self.write( + { + "inspection_closed_at": fields.Datetime.now(), + "inspection_closed_by": self.env.user.id, + } + ) diff --git a/maintenance_inspection/readme/CONTRIBUTORS.rst b/maintenance_inspection/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..85004765b --- /dev/null +++ b/maintenance_inspection/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Enric Tobella diff --git a/maintenance_inspection/readme/DESCRIPTION.rst b/maintenance_inspection/readme/DESCRIPTION.rst new file mode 100644 index 000000000..fff724065 --- /dev/null +++ b/maintenance_inspection/readme/DESCRIPTION.rst @@ -0,0 +1,4 @@ +Add the concept of inspection items inside Maintenance requests. + +Will only be usable insidea preventive requests. + diff --git a/maintenance_inspection/readme/USAGE.rst b/maintenance_inspection/readme/USAGE.rst new file mode 100644 index 000000000..743fe8b44 --- /dev/null +++ b/maintenance_inspection/readme/USAGE.rst @@ -0,0 +1,10 @@ +On Preventive requests, we will be able to set an inspection and check some items. + +Once we close the inspection it will be no longer editable. + + +On Plans +~~~~~~~~ + +When using Maintenance Plans, we can define items to evaluate in order to generate +them automatically on maintenance creation diff --git a/maintenance_inspection/security/ir.model.access.csv b/maintenance_inspection/security/ir.model.access.csv new file mode 100644 index 000000000..cc29902af --- /dev/null +++ b/maintenance_inspection/security/ir.model.access.csv @@ -0,0 +1,5 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_maintenance_inspection_item_user,access_maintenance_inspection_item_user,model_maintenance_inspection_item,base.group_user,1,0,0,0 +access_maintenance_inspection_line_user,access_maintenance_inspection_line_user,model_maintenance_inspection_line,base.group_user,1,0,0,0 +access_maintenance_inspection_item_manager,access_maintenance_inspection_item_manager,model_maintenance_inspection_item,maintenance.group_equipment_manager,1,1,1,0 +access_maintenance_inspection_line_manager,access_maintenance_inspection_line_manager,model_maintenance_inspection_line,maintenance.group_equipment_manager,1,1,1,1 diff --git a/maintenance_inspection/static/description/icon.png b/maintenance_inspection/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?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BICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/maintenance_inspection/static/description/index.html b/maintenance_inspection/static/description/index.html new file mode 100644 index 000000000..28770ce27 --- /dev/null +++ b/maintenance_inspection/static/description/index.html @@ -0,0 +1,436 @@ + + + + + + +Maintenance Inspection + + + +
+

Maintenance Inspection

+ + +

Beta License: AGPL-3 OCA/maintenance Translate me on Weblate Try me on Runboat

+

Add the concept of inspection items inside Maintenance requests.

+

Will only be usable insidea preventive requests.

+

Table of contents

+ +
+

Usage

+

On Preventive requests, we will be able to set an inspection and check some items.

+

Once we close the inspection it will be no longer editable.

+
+

On Plans

+

When using Maintenance Plans, we can define items to evaluate in order to generate +them automatically on maintenance creation

+
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Dixmit
  • +
+
+
+

Contributors

+
    +
  • Enric Tobella
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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 project on GitHub.

+

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

+
+
+
+ + diff --git a/maintenance_inspection/tests/__init__.py b/maintenance_inspection/tests/__init__.py new file mode 100644 index 000000000..a2ba695d5 --- /dev/null +++ b/maintenance_inspection/tests/__init__.py @@ -0,0 +1 @@ +from . import test_inspection diff --git a/maintenance_inspection/tests/test_inspection.py b/maintenance_inspection/tests/test_inspection.py new file mode 100644 index 000000000..5cd0d7300 --- /dev/null +++ b/maintenance_inspection/tests/test_inspection.py @@ -0,0 +1,78 @@ +# Copyright 2023 Dixmit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo.addons.maintenance_plan.tests.common import TestMaintenancePlanBase + + +class TestInspection(TestMaintenancePlanBase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.item_1 = cls.env["maintenance.inspection.item"].create( + { + "name": "item 01", + } + ) + cls.item_2 = cls.env["maintenance.inspection.item"].create( + { + "name": "item 02", + } + ) + + def test_request(self): + """ + Testing the new flow. + 1 - Setting an inspection + 2 - Setting the value of the inspection + 3 - Closing the inspection + """ + request = self.env["maintenance.request"].create( + { + "name": "Request", + "maintenance_type": "preventive", + } + ) + self.assertFalse(request.has_inspection) + request.set_inspection() + self.assertTrue(request.has_inspection) + self.assertFalse(request.inspection_line_ids) + request.write({"inspection_line_ids": [(0, 0, {"item_id": self.item_1.id})]}) + self.assertEqual(request.inspection_line_ids.result, "todo") + request.inspection_line_ids.action_success() + self.assertEqual(request.inspection_line_ids.result, "success") + request.inspection_line_ids.action_failure() + self.assertEqual(request.inspection_line_ids.result, "failure") + self.assertFalse(request.inspection_closed_at) + request.finish_inspection() + self.assertTrue(request.inspection_closed_at) + + def test_plan_no_inspection(self): + """ + Testing that everything is the same for old fashion data + """ + self.cron.method_direct_trigger() + + generated_requests = self.maintenance_request_obj.search( + [("maintenance_plan_id", "=", self.maintenance_plan_1.id)], + order="schedule_date asc", + ) + self.assertEqual(len(generated_requests), 3) + self.assertFalse(any(generated_requests.mapped("has_inspection"))) + + def test_plan_inspection(self): + """ + Testing what happens when we create a plan with assigned inspection items: + Inspection lines should be created + """ + self.maintenance_plan_1.inspection_item_ids = self.item_1 | self.item_2 + self.cron.method_direct_trigger() + generated_requests = self.maintenance_request_obj.search( + [("maintenance_plan_id", "=", self.maintenance_plan_1.id)], + order="schedule_date asc", + ) + self.assertEqual(len(generated_requests), 3) + self.assertTrue(all(generated_requests.mapped("has_inspection"))) + for request in generated_requests: + self.assertEqual(2, len(request.inspection_line_ids)) + self.assertIn(self.item_1, request.mapped("inspection_line_ids.item_id")) + self.assertIn(self.item_2, request.mapped("inspection_line_ids.item_id")) diff --git a/maintenance_inspection/views/maintenance_inspection_item.xml b/maintenance_inspection/views/maintenance_inspection_item.xml new file mode 100644 index 000000000..fc3abe813 --- /dev/null +++ b/maintenance_inspection/views/maintenance_inspection_item.xml @@ -0,0 +1,73 @@ + + + + + + maintenance.inspection.item + +
+
+ + + +
+
+
+ + + + + + + + + + maintenance.inspection.item + + + + + + + + + + maintenance.inspection.item + + + + + + + + + + Inspection Item + maintenance.inspection.item + tree,form + [] + {} + + + + Inspection Item + + + + + diff --git a/maintenance_inspection/views/maintenance_inspection_line.xml b/maintenance_inspection/views/maintenance_inspection_line.xml new file mode 100644 index 000000000..5b42b06c9 --- /dev/null +++ b/maintenance_inspection/views/maintenance_inspection_line.xml @@ -0,0 +1,128 @@ + + + + + + maintenance.inspection.line + +
+
+ + + + + + + + + + + + + + + maintenance.inspection.line + + + + + + + + + +
+ +
+
+ + + + + +
+ + + +
+
+
+ + + +
+
+
+
+
+
+
+
+ + + maintenance.inspection.line + + + + + + + + + + From 7cd14f31dc2b30e594a16fa5068a81e1527fdea9 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 22 Apr 2024 20:14:52 +0000 Subject: [PATCH 2/9] [UPD] Update maintenance_inspection.pot --- .../i18n/maintenance_inspection.pot | 207 ++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 maintenance_inspection/i18n/maintenance_inspection.pot diff --git a/maintenance_inspection/i18n/maintenance_inspection.pot b/maintenance_inspection/i18n/maintenance_inspection.pot new file mode 100644 index 000000000..d39314b0b --- /dev/null +++ b/maintenance_inspection/i18n/maintenance_inspection.pot @@ -0,0 +1,207 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * maintenance_inspection +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__active +msgid "Active" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_kanban_view +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_tree_view +msgid "Approve" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_item_form_view +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_item_search_view +msgid "Archived" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__create_uid +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__create_uid +msgid "Created by" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__create_date +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__create_date +msgid "Created on" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_equipment__display_name +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__display_name +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__display_name +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan__display_name +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__display_name +msgid "Display Name" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_kanban_view +msgid "Dropdown menu" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields.selection,name:maintenance_inspection.selection__maintenance_inspection_line__result__failure +msgid "Failure" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_request_form_view +msgid "Finish inspection" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__has_inspection +msgid "Has Inspection" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_equipment__id +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__id +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__id +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan__id +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__id +msgid "ID" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_request_form_view +msgid "Inspection" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__inspection_closed_at +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__inspection_closed_at +msgid "Inspection Closed At" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__inspection_closed_by +msgid "Inspection Closed By" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.actions.act_window,name:maintenance_inspection.maintenance_inspection_item_act_window +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan__inspection_item_ids +#: model:ir.ui.menu,name:maintenance_inspection.maintenance_inspection_item_menu +msgid "Inspection Item" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__inspection_line_ids +msgid "Inspection Line" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__instruction +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__instruction +msgid "Instruction" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__item_id +msgid "Item" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_inspection_item +msgid "Item of evaluation" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_equipment____last_update +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item____last_update +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line____last_update +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan____last_update +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request____last_update +msgid "Last Modified on" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__write_uid +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__write_date +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__write_date +msgid "Last Updated on" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_equipment +msgid "Maintenance Equipment" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_inspection_line +msgid "Maintenance Inspection Line" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_plan +msgid "Maintenance Plan" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_request +msgid "Maintenance Request" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__name +msgid "Name" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_kanban_view +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_tree_view +msgid "Refuse" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__request_id +msgid "Request" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__result +msgid "Result" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__result_description +msgid "Result Description" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_request_form_view +msgid "Set inspection" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields.selection,name:maintenance_inspection.selection__maintenance_inspection_line__result__success +msgid "Success" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields.selection,name:maintenance_inspection.selection__maintenance_inspection_line__result__todo +msgid "Todo" +msgstr "" From 01edee6eb797cba1043c238133f7a3570ca9e0bc Mon Sep 17 00:00:00 2001 From: Yann Papouin Date: Mon, 17 Jun 2024 12:53:26 +0000 Subject: [PATCH 3/9] Added translation using Weblate (French) --- maintenance_inspection/i18n/fr.po | 208 ++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 maintenance_inspection/i18n/fr.po diff --git a/maintenance_inspection/i18n/fr.po b/maintenance_inspection/i18n/fr.po new file mode 100644 index 000000000..5c7c7e450 --- /dev/null +++ b/maintenance_inspection/i18n/fr.po @@ -0,0 +1,208 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * maintenance_inspection +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__active +msgid "Active" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_kanban_view +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_tree_view +msgid "Approve" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_item_form_view +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_item_search_view +msgid "Archived" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__create_uid +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__create_uid +msgid "Created by" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__create_date +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__create_date +msgid "Created on" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_equipment__display_name +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__display_name +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__display_name +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan__display_name +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__display_name +msgid "Display Name" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_kanban_view +msgid "Dropdown menu" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields.selection,name:maintenance_inspection.selection__maintenance_inspection_line__result__failure +msgid "Failure" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_request_form_view +msgid "Finish inspection" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__has_inspection +msgid "Has Inspection" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_equipment__id +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__id +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__id +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan__id +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__id +msgid "ID" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_request_form_view +msgid "Inspection" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__inspection_closed_at +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__inspection_closed_at +msgid "Inspection Closed At" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__inspection_closed_by +msgid "Inspection Closed By" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.actions.act_window,name:maintenance_inspection.maintenance_inspection_item_act_window +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan__inspection_item_ids +#: model:ir.ui.menu,name:maintenance_inspection.maintenance_inspection_item_menu +msgid "Inspection Item" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__inspection_line_ids +msgid "Inspection Line" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__instruction +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__instruction +msgid "Instruction" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__item_id +msgid "Item" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_inspection_item +msgid "Item of evaluation" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_equipment____last_update +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item____last_update +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line____last_update +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan____last_update +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request____last_update +msgid "Last Modified on" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__write_uid +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__write_date +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__write_date +msgid "Last Updated on" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_equipment +msgid "Maintenance Equipment" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_inspection_line +msgid "Maintenance Inspection Line" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_plan +msgid "Maintenance Plan" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_request +msgid "Maintenance Request" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__name +msgid "Name" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_kanban_view +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_tree_view +msgid "Refuse" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__request_id +msgid "Request" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__result +msgid "Result" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__result_description +msgid "Result Description" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_request_form_view +msgid "Set inspection" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields.selection,name:maintenance_inspection.selection__maintenance_inspection_line__result__success +msgid "Success" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields.selection,name:maintenance_inspection.selection__maintenance_inspection_line__result__todo +msgid "Todo" +msgstr "" From 7f2f205021f5d86eb98ba55eb652202957f26819 Mon Sep 17 00:00:00 2001 From: Yann Papouin Date: Mon, 17 Jun 2024 13:03:12 +0000 Subject: [PATCH 4/9] Translated using Weblate (French) Currently translated at 100.0% (34 of 34 strings) Translation: maintenance-14.0/maintenance-14.0-maintenance_inspection Translate-URL: https://translation.odoo-community.org/projects/maintenance-14-0/maintenance-14-0-maintenance_inspection/fr/ --- maintenance_inspection/i18n/fr.po | 72 ++++++++++++++++--------------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/maintenance_inspection/i18n/fr.po b/maintenance_inspection/i18n/fr.po index 5c7c7e450..4be362370 100644 --- a/maintenance_inspection/i18n/fr.po +++ b/maintenance_inspection/i18n/fr.po @@ -6,42 +6,44 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2024-06-17 13:38+0000\n" +"Last-Translator: Yann Papouin \n" "Language-Team: none\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.17\n" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__active msgid "Active" -msgstr "" +msgstr "Actif" #. module: maintenance_inspection #: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_kanban_view #: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_tree_view msgid "Approve" -msgstr "" +msgstr "Approuver" #. module: maintenance_inspection #: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_item_form_view #: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_item_search_view msgid "Archived" -msgstr "" +msgstr "Archivé" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__create_uid #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__create_uid msgid "Created by" -msgstr "" +msgstr "Créé par" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__create_date #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__create_date msgid "Created on" -msgstr "" +msgstr "Créé le" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_equipment__display_name @@ -50,27 +52,27 @@ msgstr "" #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan__display_name #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__display_name msgid "Display Name" -msgstr "" +msgstr "Nom affiché" #. module: maintenance_inspection #: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_kanban_view msgid "Dropdown menu" -msgstr "" +msgstr "Menu déroulant" #. module: maintenance_inspection #: model:ir.model.fields.selection,name:maintenance_inspection.selection__maintenance_inspection_line__result__failure msgid "Failure" -msgstr "" +msgstr "Échec" #. module: maintenance_inspection #: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_request_form_view msgid "Finish inspection" -msgstr "" +msgstr "Terminer l'inspection" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__has_inspection msgid "Has Inspection" -msgstr "" +msgstr "Fait l'objet d'une inspection" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_equipment__id @@ -79,51 +81,51 @@ msgstr "" #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan__id #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__id msgid "ID" -msgstr "" +msgstr "ID" #. module: maintenance_inspection #: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_request_form_view msgid "Inspection" -msgstr "" +msgstr "Inspection" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__inspection_closed_at #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__inspection_closed_at msgid "Inspection Closed At" -msgstr "" +msgstr "Inspection clôturée à" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__inspection_closed_by msgid "Inspection Closed By" -msgstr "" +msgstr "Inspection clôturée par" #. module: maintenance_inspection #: model:ir.actions.act_window,name:maintenance_inspection.maintenance_inspection_item_act_window #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan__inspection_item_ids #: model:ir.ui.menu,name:maintenance_inspection.maintenance_inspection_item_menu msgid "Inspection Item" -msgstr "" +msgstr "Point d'inspection" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__inspection_line_ids msgid "Inspection Line" -msgstr "" +msgstr "Ligne d'inspection" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__instruction #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__instruction msgid "Instruction" -msgstr "" +msgstr "Instruction" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__item_id msgid "Item" -msgstr "" +msgstr "Element" #. module: maintenance_inspection #: model:ir.model,name:maintenance_inspection.model_maintenance_inspection_item msgid "Item of evaluation" -msgstr "" +msgstr "Élément d'évaluation" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_equipment____last_update @@ -132,77 +134,77 @@ msgstr "" #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan____last_update #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request____last_update msgid "Last Modified on" -msgstr "" +msgstr "Dernière modification le" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__write_uid #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__write_uid msgid "Last Updated by" -msgstr "" +msgstr "Modifié par" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__write_date #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__write_date msgid "Last Updated on" -msgstr "" +msgstr "Modifié le" #. module: maintenance_inspection #: model:ir.model,name:maintenance_inspection.model_maintenance_equipment msgid "Maintenance Equipment" -msgstr "" +msgstr "Equipement de maintenance" #. module: maintenance_inspection #: model:ir.model,name:maintenance_inspection.model_maintenance_inspection_line msgid "Maintenance Inspection Line" -msgstr "" +msgstr "Ligne d'inspection de maintenance" #. module: maintenance_inspection #: model:ir.model,name:maintenance_inspection.model_maintenance_plan msgid "Maintenance Plan" -msgstr "" +msgstr "Plan de Maintenance" #. module: maintenance_inspection #: model:ir.model,name:maintenance_inspection.model_maintenance_request msgid "Maintenance Request" -msgstr "" +msgstr "Demande de maintenance" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__name msgid "Name" -msgstr "" +msgstr "Nom" #. module: maintenance_inspection #: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_kanban_view #: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_tree_view msgid "Refuse" -msgstr "" +msgstr "Refuser" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__request_id msgid "Request" -msgstr "" +msgstr "Requête" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__result msgid "Result" -msgstr "" +msgstr "Résultat" #. module: maintenance_inspection #: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__result_description msgid "Result Description" -msgstr "" +msgstr "Description du résultat" #. module: maintenance_inspection #: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_request_form_view msgid "Set inspection" -msgstr "" +msgstr "Inspecter" #. module: maintenance_inspection #: model:ir.model.fields.selection,name:maintenance_inspection.selection__maintenance_inspection_line__result__success msgid "Success" -msgstr "" +msgstr "Réussie" #. module: maintenance_inspection #: model:ir.model.fields.selection,name:maintenance_inspection.selection__maintenance_inspection_line__result__todo msgid "Todo" -msgstr "" +msgstr "À faire" From f64bb42ceb6931b104b0dd14e9673c1680212162 Mon Sep 17 00:00:00 2001 From: mymage Date: Tue, 10 Dec 2024 08:10:01 +0000 Subject: [PATCH 5/9] Added translation using Weblate (Italian) --- maintenance_inspection/i18n/it.po | 208 ++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 maintenance_inspection/i18n/it.po diff --git a/maintenance_inspection/i18n/it.po b/maintenance_inspection/i18n/it.po new file mode 100644 index 000000000..3c07d77b2 --- /dev/null +++ b/maintenance_inspection/i18n/it.po @@ -0,0 +1,208 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * maintenance_inspection +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__active +msgid "Active" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_kanban_view +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_tree_view +msgid "Approve" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_item_form_view +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_item_search_view +msgid "Archived" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__create_uid +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__create_uid +msgid "Created by" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__create_date +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__create_date +msgid "Created on" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_equipment__display_name +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__display_name +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__display_name +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan__display_name +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__display_name +msgid "Display Name" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_kanban_view +msgid "Dropdown menu" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields.selection,name:maintenance_inspection.selection__maintenance_inspection_line__result__failure +msgid "Failure" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_request_form_view +msgid "Finish inspection" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__has_inspection +msgid "Has Inspection" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_equipment__id +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__id +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__id +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan__id +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__id +msgid "ID" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_request_form_view +msgid "Inspection" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__inspection_closed_at +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__inspection_closed_at +msgid "Inspection Closed At" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__inspection_closed_by +msgid "Inspection Closed By" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.actions.act_window,name:maintenance_inspection.maintenance_inspection_item_act_window +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan__inspection_item_ids +#: model:ir.ui.menu,name:maintenance_inspection.maintenance_inspection_item_menu +msgid "Inspection Item" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request__inspection_line_ids +msgid "Inspection Line" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__instruction +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__instruction +msgid "Instruction" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__item_id +msgid "Item" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_inspection_item +msgid "Item of evaluation" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_equipment____last_update +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item____last_update +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line____last_update +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_plan____last_update +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_request____last_update +msgid "Last Modified on" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__write_uid +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__write_date +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__write_date +msgid "Last Updated on" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_equipment +msgid "Maintenance Equipment" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_inspection_line +msgid "Maintenance Inspection Line" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_plan +msgid "Maintenance Plan" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model,name:maintenance_inspection.model_maintenance_request +msgid "Maintenance Request" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_item__name +msgid "Name" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_kanban_view +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_inspection_line_tree_view +msgid "Refuse" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__request_id +msgid "Request" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__result +msgid "Result" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields,field_description:maintenance_inspection.field_maintenance_inspection_line__result_description +msgid "Result Description" +msgstr "" + +#. module: maintenance_inspection +#: model_terms:ir.ui.view,arch_db:maintenance_inspection.maintenance_request_form_view +msgid "Set inspection" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields.selection,name:maintenance_inspection.selection__maintenance_inspection_line__result__success +msgid "Success" +msgstr "" + +#. module: maintenance_inspection +#: model:ir.model.fields.selection,name:maintenance_inspection.selection__maintenance_inspection_line__result__todo +msgid "Todo" +msgstr "" From 0bceafaecbe39bd0cc65746e270568fa75dab906 Mon Sep 17 00:00:00 2001 From: Yann Papouin Date: Fri, 17 Oct 2025 15:36:37 +0200 Subject: [PATCH 6/9] [IMP] maintenance_inspection: pre-commit auto fixes --- maintenance_inspection/README.rst | 29 +++++++++---------- .../models/maintenance_equipment.py | 1 - .../models/maintenance_inspection_item.py | 1 - .../models/maintenance_inspection_line.py | 1 - .../models/maintenance_plan.py | 1 - .../models/maintenance_request.py | 1 - maintenance_inspection/pyproject.toml | 3 ++ maintenance_inspection/readme/CONTRIBUTORS.md | 1 + .../readme/CONTRIBUTORS.rst | 1 - .../{DESCRIPTION.rst => DESCRIPTION.md} | 1 - .../readme/{USAGE.rst => USAGE.md} | 11 ++++--- .../static/description/index.html | 25 +++++++++------- .../views/maintenance_inspection_item.xml | 2 -- .../views/maintenance_inspection_line.xml | 2 -- .../views/maintenance_plan.xml | 4 --- .../views/maintenance_request.xml | 1 - 16 files changed, 37 insertions(+), 48 deletions(-) create mode 100644 maintenance_inspection/pyproject.toml create mode 100644 maintenance_inspection/readme/CONTRIBUTORS.md delete mode 100644 maintenance_inspection/readme/CONTRIBUTORS.rst rename maintenance_inspection/readme/{DESCRIPTION.rst => DESCRIPTION.md} (99%) rename maintenance_inspection/readme/{USAGE.rst => USAGE.md} (65%) diff --git a/maintenance_inspection/README.rst b/maintenance_inspection/README.rst index f741fa3a2..9b8e89598 100644 --- a/maintenance_inspection/README.rst +++ b/maintenance_inspection/README.rst @@ -17,13 +17,13 @@ Maintenance Inspection :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/14.0/maintenance_inspection + :target: https://github.com/OCA/maintenance/tree/18.0/maintenance_inspection :alt: OCA/maintenance .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/maintenance-14-0/maintenance-14-0-maintenance_inspection + :target: https://translation.odoo-community.org/projects/maintenance-18-0/maintenance-18-0-maintenance_inspection :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=14.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/maintenance&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -32,7 +32,6 @@ Add the concept of inspection items inside Maintenance requests. Will only be usable insidea preventive requests. - **Table of contents** .. contents:: @@ -41,16 +40,16 @@ Will only be usable insidea preventive requests. Usage ===== -On Preventive requests, we will be able to set an inspection and check some items. +On Preventive requests, we will be able to set an inspection and check +some items. Once we close the inspection it will be no longer editable. - On Plans -~~~~~~~~ +-------- -When using Maintenance Plans, we can define items to evaluate in order to generate -them automatically on maintenance creation +When using Maintenance Plans, we can define items to evaluate in order +to generate them automatically on maintenance creation Bug Tracker =========== @@ -58,7 +57,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -66,17 +65,17 @@ Credits ======= Authors -~~~~~~~ +------- * Dixmit Contributors -~~~~~~~~~~~~ +------------ -* Enric Tobella +- Enric Tobella Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -88,6 +87,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 `_ project on GitHub. +This module is part of the `OCA/maintenance `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/maintenance_inspection/models/maintenance_equipment.py b/maintenance_inspection/models/maintenance_equipment.py index 183cbc627..f2fec0d3f 100644 --- a/maintenance_inspection/models/maintenance_equipment.py +++ b/maintenance_inspection/models/maintenance_equipment.py @@ -5,7 +5,6 @@ class MaintenanceEquipment(models.Model): - _inherit = "maintenance.equipment" def _prepare_request_from_plan(self, maintenance_plan, next_maintenance_date): diff --git a/maintenance_inspection/models/maintenance_inspection_item.py b/maintenance_inspection/models/maintenance_inspection_item.py index d86474f29..ae8c80f53 100644 --- a/maintenance_inspection/models/maintenance_inspection_item.py +++ b/maintenance_inspection/models/maintenance_inspection_item.py @@ -5,7 +5,6 @@ class MaintenanceInspectionItem(models.Model): - _name = "maintenance.inspection.item" _description = "Item of evaluation" diff --git a/maintenance_inspection/models/maintenance_inspection_line.py b/maintenance_inspection/models/maintenance_inspection_line.py index b5168609d..067d90080 100644 --- a/maintenance_inspection/models/maintenance_inspection_line.py +++ b/maintenance_inspection/models/maintenance_inspection_line.py @@ -5,7 +5,6 @@ class MaintenanceInspectionLine(models.Model): - _name = "maintenance.inspection.line" _description = "Maintenance Inspection Line" diff --git a/maintenance_inspection/models/maintenance_plan.py b/maintenance_inspection/models/maintenance_plan.py index 073ffbaca..9f717af96 100644 --- a/maintenance_inspection/models/maintenance_plan.py +++ b/maintenance_inspection/models/maintenance_plan.py @@ -5,7 +5,6 @@ class MaintenancePlan(models.Model): - _inherit = "maintenance.plan" inspection_item_ids = fields.Many2many("maintenance.inspection.item") diff --git a/maintenance_inspection/models/maintenance_request.py b/maintenance_inspection/models/maintenance_request.py index c464fb528..01c68dd27 100644 --- a/maintenance_inspection/models/maintenance_request.py +++ b/maintenance_inspection/models/maintenance_request.py @@ -5,7 +5,6 @@ class MaintenanceRequest(models.Model): - _inherit = "maintenance.request" has_inspection = fields.Boolean() diff --git a/maintenance_inspection/pyproject.toml b/maintenance_inspection/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/maintenance_inspection/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/maintenance_inspection/readme/CONTRIBUTORS.md b/maintenance_inspection/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..c84bf49d7 --- /dev/null +++ b/maintenance_inspection/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Enric Tobella diff --git a/maintenance_inspection/readme/CONTRIBUTORS.rst b/maintenance_inspection/readme/CONTRIBUTORS.rst deleted file mode 100644 index 85004765b..000000000 --- a/maintenance_inspection/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1 +0,0 @@ -* Enric Tobella diff --git a/maintenance_inspection/readme/DESCRIPTION.rst b/maintenance_inspection/readme/DESCRIPTION.md similarity index 99% rename from maintenance_inspection/readme/DESCRIPTION.rst rename to maintenance_inspection/readme/DESCRIPTION.md index fff724065..4b9301080 100644 --- a/maintenance_inspection/readme/DESCRIPTION.rst +++ b/maintenance_inspection/readme/DESCRIPTION.md @@ -1,4 +1,3 @@ Add the concept of inspection items inside Maintenance requests. Will only be usable insidea preventive requests. - diff --git a/maintenance_inspection/readme/USAGE.rst b/maintenance_inspection/readme/USAGE.md similarity index 65% rename from maintenance_inspection/readme/USAGE.rst rename to maintenance_inspection/readme/USAGE.md index 743fe8b44..98bf25dfb 100644 --- a/maintenance_inspection/readme/USAGE.rst +++ b/maintenance_inspection/readme/USAGE.md @@ -1,10 +1,9 @@ -On Preventive requests, we will be able to set an inspection and check some items. +On Preventive requests, we will be able to set an inspection and check +some items. Once we close the inspection it will be no longer editable. +## On Plans -On Plans -~~~~~~~~ - -When using Maintenance Plans, we can define items to evaluate in order to generate -them automatically on maintenance creation +When using Maintenance Plans, we can define items to evaluate in order +to generate them automatically on maintenance creation diff --git a/maintenance_inspection/static/description/index.html b/maintenance_inspection/static/description/index.html index 28770ce27..c6dd77cc6 100644 --- a/maintenance_inspection/static/description/index.html +++ b/maintenance_inspection/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -369,7 +369,7 @@

Maintenance Inspection

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:36f12f29772c69279f92e5439bd43d832a9632f9e8fbf968399855598da14453 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/maintenance Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/maintenance Translate me on Weblate Try me on Runboat

Add the concept of inspection items inside Maintenance requests.

Will only be usable insidea preventive requests.

Table of contents

@@ -390,12 +390,13 @@

Maintenance Inspection

Usage

-

On Preventive requests, we will be able to set an inspection and check some items.

+

On Preventive requests, we will be able to set an inspection and check +some items.

Once we close the inspection it will be no longer editable.

On Plans

-

When using Maintenance Plans, we can define items to evaluate in order to generate -them automatically on maintenance creation

+

When using Maintenance Plans, we can define items to evaluate in order +to generate them automatically on maintenance creation

@@ -403,7 +404,7 @@

Bug Tracker

Bugs are tracked on GitHub 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.

+feedback.

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

@@ -423,11 +424,13 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

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 project on GitHub.

+

This module is part of the OCA/maintenance project on GitHub.

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

diff --git a/maintenance_inspection/views/maintenance_inspection_item.xml b/maintenance_inspection/views/maintenance_inspection_item.xml index fc3abe813..f66508803 100644 --- a/maintenance_inspection/views/maintenance_inspection_item.xml +++ b/maintenance_inspection/views/maintenance_inspection_item.xml @@ -2,14 +2,12 @@ - maintenance.inspection.item
- - maintenance.inspection.line @@ -124,5 +123,4 @@ - diff --git a/maintenance_inspection/views/maintenance_plan.xml b/maintenance_inspection/views/maintenance_plan.xml index 0b1879f9f..e8a80c896 100644 --- a/maintenance_inspection/views/maintenance_plan.xml +++ b/maintenance_inspection/views/maintenance_plan.xml @@ -2,7 +2,6 @@ - maintenance.plan @@ -12,7 +11,4 @@ - - - diff --git a/maintenance_inspection/views/maintenance_request.xml b/maintenance_inspection/views/maintenance_request.xml index 8c22df429..808b01366 100644 --- a/maintenance_inspection/views/maintenance_request.xml +++ b/maintenance_inspection/views/maintenance_request.xml @@ -2,7 +2,6 @@ - maintenance.request From 569ddbe0b43922ed4654b9353d4e14ff34610bf4 Mon Sep 17 00:00:00 2001 From: Yann Papouin Date: Mon, 20 Oct 2025 09:58:51 +0200 Subject: [PATCH 7/9] [MIG] maintenance_inspection: Migration to 18.0 --- maintenance_inspection/README.rst | 3 +- maintenance_inspection/__manifest__.py | 2 +- .../models/maintenance_equipment.py | 8 ++---- .../models/maintenance_inspection_line.py | 5 ++-- .../models/maintenance_request.py | 17 ++++++++--- maintenance_inspection/readme/CONTRIBUTORS.md | 1 + maintenance_inspection/readme/DESCRIPTION.md | 2 +- .../static/description/index.html | 3 +- .../tests/test_inspection.py | 28 ++++++++++++++++++- .../views/maintenance_inspection_item.xml | 8 +++--- .../views/maintenance_inspection_line.xml | 10 +++---- .../views/maintenance_request.xml | 14 +++++----- 12 files changed, 68 insertions(+), 33 deletions(-) diff --git a/maintenance_inspection/README.rst b/maintenance_inspection/README.rst index 9b8e89598..7dc918f2d 100644 --- a/maintenance_inspection/README.rst +++ b/maintenance_inspection/README.rst @@ -30,7 +30,7 @@ Maintenance Inspection Add the concept of inspection items inside Maintenance requests. -Will only be usable insidea preventive requests. +Will only be usable inside a preventive requests. **Table of contents** @@ -73,6 +73,7 @@ Contributors ------------ - Enric Tobella +- Yann Papouin Maintainers ----------- diff --git a/maintenance_inspection/__manifest__.py b/maintenance_inspection/__manifest__.py index e656e6629..8db50956b 100644 --- a/maintenance_inspection/__manifest__.py +++ b/maintenance_inspection/__manifest__.py @@ -5,7 +5,7 @@ "name": "Maintenance Inspection", "summary": """ Allow to manage inspections inside Preventive requests""", - "version": "14.0.1.0.0", + "version": "18.0.1.0.0", "license": "AGPL-3", "author": "Dixmit,Odoo Community Association (OCA)", "website": "https://github.com/OCA/maintenance", diff --git a/maintenance_inspection/models/maintenance_equipment.py b/maintenance_inspection/models/maintenance_equipment.py index f2fec0d3f..017aacbed 100644 --- a/maintenance_inspection/models/maintenance_equipment.py +++ b/maintenance_inspection/models/maintenance_equipment.py @@ -1,7 +1,7 @@ # Copyright 2023 Dixmit # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import models +from odoo import Command, models class MaintenanceEquipment(models.Model): @@ -16,12 +16,10 @@ def _prepare_request_from_plan(self, maintenance_plan, next_maintenance_date): { "has_inspection": True, "inspection_line_ids": [ - ( - 0, - 0, + Command.create( { "item_id": item.id, - }, + } ) for item in maintenance_plan.inspection_item_ids ], diff --git a/maintenance_inspection/models/maintenance_inspection_line.py b/maintenance_inspection/models/maintenance_inspection_line.py index 067d90080..7234cfc6f 100644 --- a/maintenance_inspection/models/maintenance_inspection_line.py +++ b/maintenance_inspection/models/maintenance_inspection_line.py @@ -15,7 +15,6 @@ class MaintenanceInspectionLine(models.Model): instruction = fields.Text(related="item_id.instruction") result = fields.Selection( [("todo", "Todo"), ("success", "Success"), ("failure", "Failure")], - "Result", default="todo", readonly=True, required=True, @@ -25,7 +24,7 @@ class MaintenanceInspectionLine(models.Model): inspection_closed_at = fields.Datetime(related="request_id.inspection_closed_at") def action_success(self): - self.write({"result": "success"}) + self.update({"result": "success"}) def action_failure(self): - self.write({"result": "failure"}) + self.update({"result": "failure"}) diff --git a/maintenance_inspection/models/maintenance_request.py b/maintenance_inspection/models/maintenance_request.py index 01c68dd27..f43b3bf2b 100644 --- a/maintenance_inspection/models/maintenance_request.py +++ b/maintenance_inspection/models/maintenance_request.py @@ -11,16 +11,25 @@ class MaintenanceRequest(models.Model): inspection_line_ids = fields.One2many( "maintenance.inspection.line", inverse_name="request_id" ) - inspection_closed_at = fields.Datetime(readonly=True, copy=False) - inspection_closed_by = fields.Many2one("res.users", readonly=True, copy=False) + inspection_closed_at = fields.Datetime(copy=False) + inspection_closed_by = fields.Many2one("res.users", copy=False) def set_inspection(self): - self.write({"has_inspection": True}) + self.has_inspection = True def finish_inspection(self): - self.write( + self.update( { "inspection_closed_at": fields.Datetime.now(), "inspection_closed_by": self.env.user.id, } ) + + def reset_equipment_request(self): + self.update( + { + "inspection_closed_at": False, + "inspection_closed_by": False, + } + ) + return super().reset_equipment_request() diff --git a/maintenance_inspection/readme/CONTRIBUTORS.md b/maintenance_inspection/readme/CONTRIBUTORS.md index c84bf49d7..955e6c981 100644 --- a/maintenance_inspection/readme/CONTRIBUTORS.md +++ b/maintenance_inspection/readme/CONTRIBUTORS.md @@ -1 +1,2 @@ - Enric Tobella +- Yann Papouin \ diff --git a/maintenance_inspection/readme/DESCRIPTION.md b/maintenance_inspection/readme/DESCRIPTION.md index 4b9301080..7ebb5e923 100644 --- a/maintenance_inspection/readme/DESCRIPTION.md +++ b/maintenance_inspection/readme/DESCRIPTION.md @@ -1,3 +1,3 @@ Add the concept of inspection items inside Maintenance requests. -Will only be usable insidea preventive requests. +Will only be usable inside a preventive requests. diff --git a/maintenance_inspection/static/description/index.html b/maintenance_inspection/static/description/index.html index c6dd77cc6..9d0e5416b 100644 --- a/maintenance_inspection/static/description/index.html +++ b/maintenance_inspection/static/description/index.html @@ -371,7 +371,7 @@

Maintenance Inspection

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/maintenance Translate me on Weblate Try me on Runboat

Add the concept of inspection items inside Maintenance requests.

-

Will only be usable insidea preventive requests.

+

Will only be usable inside a preventive requests.

Table of contents

diff --git a/maintenance_inspection/tests/test_inspection.py b/maintenance_inspection/tests/test_inspection.py index 5cd0d7300..2fcb71956 100644 --- a/maintenance_inspection/tests/test_inspection.py +++ b/maintenance_inspection/tests/test_inspection.py @@ -1,6 +1,8 @@ # Copyright 2023 Dixmit # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import Command + from odoo.addons.maintenance_plan.tests.common import TestMaintenancePlanBase @@ -36,7 +38,10 @@ def test_request(self): request.set_inspection() self.assertTrue(request.has_inspection) self.assertFalse(request.inspection_line_ids) - request.write({"inspection_line_ids": [(0, 0, {"item_id": self.item_1.id})]}) + request.write( + {"inspection_line_ids": [Command.create({"item_id": self.item_1.id})]} + ) + self.assertEqual(request.inspection_line_ids.result, "todo") request.inspection_line_ids.action_success() self.assertEqual(request.inspection_line_ids.result, "success") @@ -46,6 +51,27 @@ def test_request(self): request.finish_inspection() self.assertTrue(request.inspection_closed_at) + def test_request_reset(self): + request = self.env["maintenance.request"].create( + { + "name": "Request", + "maintenance_type": "preventive", + "has_inspection": True, + "inspection_line_ids": [Command.create({"item_id": self.item_1.id})], + } + ) + request.inspection_line_ids.action_failure() + self.assertEqual(request.inspection_line_ids.result, "failure") + request.finish_inspection() + self.assertTrue(request.inspection_closed_at) + request.archive_equipment_request() + request.reset_equipment_request() + self.assertFalse(request.inspection_closed_at) + request.inspection_line_ids.action_success() + self.assertEqual(request.inspection_line_ids.result, "success") + request.finish_inspection() + self.assertTrue(request.inspection_closed_at) + def test_plan_no_inspection(self): """ Testing that everything is the same for old fashion data diff --git a/maintenance_inspection/views/maintenance_inspection_item.xml b/maintenance_inspection/views/maintenance_inspection_item.xml index f66508803..15d75a837 100644 --- a/maintenance_inspection/views/maintenance_inspection_item.xml +++ b/maintenance_inspection/views/maintenance_inspection_item.xml @@ -12,7 +12,7 @@ name="web_ribbon" title="Archived" bg_color="bg-danger" - attrs="{'invisible': [('active', '=', True)]}" + invisible="active" />
@@ -47,17 +47,17 @@ maintenance.inspection.item - + - + Inspection Item maintenance.inspection.item - tree,form + list,form [] {} diff --git a/maintenance_inspection/views/maintenance_inspection_line.xml b/maintenance_inspection/views/maintenance_inspection_line.xml index 15ca96ca1..8c4e34338 100644 --- a/maintenance_inspection/views/maintenance_inspection_line.xml +++ b/maintenance_inspection/views/maintenance_inspection_line.xml @@ -94,7 +94,7 @@ maintenance.inspection.line - + @@ -107,7 +107,7 @@ name="action_success" string="Approve" type="object" - attrs="{'invisible':[('inspection_closed_at', '!=',False)]}" + invisible="inspection_closed_at" class="oe_highlight btn-success" icon="fa-check-circle" /> @@ -115,12 +115,12 @@ name="action_failure" string="Refuse" type="object" - attrs="{'invisible':[('inspection_closed_at', '!=',False)]}" + invisible="inspection_closed_at" class="oe_highlight btn-danger" icon="fa-times-circle" /> - - + + diff --git a/maintenance_inspection/views/maintenance_request.xml b/maintenance_inspection/views/maintenance_request.xml index 808b01366..71e126acd 100644 --- a/maintenance_inspection/views/maintenance_request.xml +++ b/maintenance_inspection/views/maintenance_request.xml @@ -10,16 +10,16 @@ - - + + @@ -29,13 +29,13 @@ name="set_inspection" type="object" string="Set inspection" - attrs="{'invisible': ['|', ('has_inspection', '=', True), ('maintenance_type', '!=', 'preventive')]}" + invisible="has_inspection or maintenance_type != 'preventive'" /> From 30a273695ebca15c0f2d2df03c2159ba44de0b50 Mon Sep 17 00:00:00 2001 From: Yann Papouin Date: Fri, 17 Oct 2025 18:21:22 +0200 Subject: [PATCH 8/9] [MIG] maintenance_inspection: Kanban view updated --- .../views/maintenance_inspection_line.xml | 99 +++++++++---------- .../views/maintenance_request.xml | 19 +++- 2 files changed, 60 insertions(+), 58 deletions(-) diff --git a/maintenance_inspection/views/maintenance_inspection_line.xml b/maintenance_inspection/views/maintenance_inspection_line.xml index 8c4e34338..1036bc3ad 100644 --- a/maintenance_inspection/views/maintenance_inspection_line.xml +++ b/maintenance_inspection/views/maintenance_inspection_line.xml @@ -29,61 +29,52 @@ + + - -
- -
-
- - - - - -
- - - -
-
-
- - - -
-
+ + Approve + Refuse + Delete + + +