diff --git a/lims_maintenance/README.rst b/lims_maintenance/README.rst new file mode 100644 index 0000000..b2bd35f --- /dev/null +++ b/lims_maintenance/README.rst @@ -0,0 +1,191 @@ +=========================================================== +Laboratory Information Management System (LIMS) Maintenance +=========================================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:70747ad32697f3e6b75eb41cd294ec7f59fb5a6f8bdf682d3c45d92e0e2ddd03 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fconnector--lims-lightgray.png?logo=github + :target: https://github.com/OCA/connector-lims/tree/18.0/lims_maintenance + :alt: OCA/connector-lims +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/connector-lims-18-0/connector-lims-18-0-lims_maintenance + :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/connector-lims&target_branch=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module integrates the **LIMS (Laboratory Information Management +System)** with Odoo’s **Maintenance** application. + +It allows each **LIMS Instrument** to be linked to a **Maintenance +Equipment** record, providing traceability and centralized management of +laboratory instruments and their maintenance schedules. + +Key Features +~~~~~~~~~~~~ + +- Adds a field ``equipment_id`` on the ``lims.instrument`` model. +- Links each instrument with an equipment record from the Maintenance + module. +- Displays the associated Maintenance Equipment directly on the + instrument form. +- Enables maintenance tracking, scheduling, and reporting for laboratory + instruments. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +Prerequisites +------------- + +Ensure the following modules are installed and configured: + +- **lims** +- **maintenance** + +Both are required for this module to function properly. + +-------------- + +Configuration Steps +------------------- + +1. Go to **Maintenance → Equipment** and create or configure your lab + equipment. +2. Open **LIMS → Instruments**. +3. In the instrument form view, select the corresponding **Maintenance + Equipment** record from the new “Maintenance” section. +4. Save your changes. + +-------------- + +Usage +===== + +Once configured, you can link each **LIMS Instrument** to its +corresponding **Maintenance Equipment** record. + +-------------- + +Linking Instruments to Maintenance Equipment +-------------------------------------------- + +1. Go to **LIMS → Instruments**. +2. Open any instrument record. +3. In the **Maintenance** section, choose a record from the *Maintenance + Equipment* dropdown. +4. Save the instrument record. + +The instrument is now linked to the selected maintenance equipment. + +-------------- + +Viewing Linked Equipment +------------------------ + +- Open the instrument form. +- The linked **Maintenance Equipment** appears in the *Maintenance* + section. +- You can click on the linked record to open the full Maintenance + Equipment form. + +-------------- + +Example Workflow +---------------- + +1. The laboratory maintains several instruments (e.g., Spectrometer, + HPLC, pH Meter). +2. Each instrument exists in both **LIMS Instruments** and **Maintenance + Equipment**. +3. After installing ``lims_maintenance``, link each LIMS instrument to + its Maintenance Equipment. +4. Maintenance operations and scheduling are now traceable directly from + LIMS. + +-------------- + +Unlinking +--------- + +To unlink an instrument from maintenance: + +1. Edit the instrument record. +2. Clear the *Maintenance Equipment* field. +3. Save the record. + +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 +------- + +* Open Source Integrators + +Contributors +------------ + +- Rodrigo Madrid rmadrid@opensourceintegrators.com +- Adriana Alpizar aalpizar@opensourceintegrators.com +- Maxime Chambreuil mchambreuil@opensourceintegrators.com +- Nikul Chaudhary nchaudhary@opensourceintegrators.com + +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. + +.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px + :target: https://github.com/max3903 + :alt: max3903 +.. |maintainer-jasiel-osi| image:: https://github.com/jasiel-osi.png?size=40px + :target: https://github.com/jasiel-osi + :alt: jasiel-osi +.. |maintainer-Nikul-OSI| image:: https://github.com/Nikul-OSI.png?size=40px + :target: https://github.com/Nikul-OSI + :alt: Nikul-OSI + +Current `maintainers `__: + +|maintainer-max3903| |maintainer-jasiel-osi| |maintainer-Nikul-OSI| + +This module is part of the `OCA/connector-lims `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/lims_maintenance/__init__.py b/lims_maintenance/__init__.py new file mode 100644 index 0000000..17a0e65 --- /dev/null +++ b/lims_maintenance/__init__.py @@ -0,0 +1,3 @@ +# Copyright (C) 2025 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from . import models diff --git a/lims_maintenance/__manifest__.py b/lims_maintenance/__manifest__.py new file mode 100644 index 0000000..311b78e --- /dev/null +++ b/lims_maintenance/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright (C) 2025 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "Laboratory Information Management System (LIMS) Maintenance", + "summary": "Manage the maintenance of your LIMS instruments", + "version": "18.0.1.0.0", + "license": "AGPL-3", + "category": "Manufacturing/Maintenance", + "author": "Open Source Integrators, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/connector-lims", + "depends": ["lims", "maintenance"], + "data": [ + "views/lims_instrument_views.xml", + ], + "application": False, + "development_status": "Beta", + "maintainers": ["max3903", "jasiel-osi", "Nikul-OSI"], +} diff --git a/lims_maintenance/models/__init__.py b/lims_maintenance/models/__init__.py new file mode 100644 index 0000000..9f3d120 --- /dev/null +++ b/lims_maintenance/models/__init__.py @@ -0,0 +1,3 @@ +# Copyright (C) 2025 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from . import lims_instrument diff --git a/lims_maintenance/models/lims_instrument.py b/lims_maintenance/models/lims_instrument.py new file mode 100644 index 0000000..980be1e --- /dev/null +++ b/lims_maintenance/models/lims_instrument.py @@ -0,0 +1,13 @@ +# Copyright (C) 2025 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import fields, models + + +class LimsInstrument(models.Model): + _inherit = "lims.instrument" + + equipment_id = fields.Many2one( + comodel_name="maintenance.equipment", + string="Maintenance Equipment", + help="Link this instrument to a Maintenance Equipment record.", + ) diff --git a/lims_maintenance/pyproject.toml b/lims_maintenance/pyproject.toml new file mode 100644 index 0000000..4231d0c --- /dev/null +++ b/lims_maintenance/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/lims_maintenance/readme/CONFIGURE.md b/lims_maintenance/readme/CONFIGURE.md new file mode 100644 index 0000000..5f9a243 --- /dev/null +++ b/lims_maintenance/readme/CONFIGURE.md @@ -0,0 +1,17 @@ +## Prerequisites +Ensure the following modules are installed and configured: +- **lims** +- **maintenance** + +Both are required for this module to function properly. + +--- + +## Configuration Steps + +1. Go to **Maintenance → Equipment** and create or configure your lab equipment. +2. Open **LIMS → Instruments**. +3. In the instrument form view, select the corresponding **Maintenance Equipment** record from the new “Maintenance” section. +4. Save your changes. + +--- diff --git a/lims_maintenance/readme/CONTRIBUTORS.md b/lims_maintenance/readme/CONTRIBUTORS.md new file mode 100644 index 0000000..d6c5d53 --- /dev/null +++ b/lims_maintenance/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ + * Rodrigo Madrid + * Adriana Alpizar + * Maxime Chambreuil + * Nikul Chaudhary diff --git a/lims_maintenance/readme/DESCRIPTION.md b/lims_maintenance/readme/DESCRIPTION.md new file mode 100644 index 0000000..f7bbf6c --- /dev/null +++ b/lims_maintenance/readme/DESCRIPTION.md @@ -0,0 +1,9 @@ +This module integrates the **LIMS (Laboratory Information Management System)** with Odoo’s **Maintenance** application. + +It allows each **LIMS Instrument** to be linked to a **Maintenance Equipment** record, providing traceability and centralized management of laboratory instruments and their maintenance schedules. + +### Key Features +- Adds a field `equipment_id` on the `lims.instrument` model. +- Links each instrument with an equipment record from the Maintenance module. +- Displays the associated Maintenance Equipment directly on the instrument form. +- Enables maintenance tracking, scheduling, and reporting for laboratory instruments. diff --git a/lims_maintenance/readme/USAGE.md b/lims_maintenance/readme/USAGE.md new file mode 100644 index 0000000..e4badfb --- /dev/null +++ b/lims_maintenance/readme/USAGE.md @@ -0,0 +1,37 @@ +Once configured, you can link each **LIMS Instrument** to its corresponding **Maintenance Equipment** record. + +--- + +## Linking Instruments to Maintenance Equipment + +1. Go to **LIMS → Instruments**. +2. Open any instrument record. +3. In the **Maintenance** section, choose a record from the *Maintenance Equipment* dropdown. +4. Save the instrument record. + +The instrument is now linked to the selected maintenance equipment. + +--- + +## Viewing Linked Equipment + +- Open the instrument form. +- The linked **Maintenance Equipment** appears in the *Maintenance* section. +- You can click on the linked record to open the full Maintenance Equipment form. + +--- + +## Example Workflow + +1. The laboratory maintains several instruments (e.g., Spectrometer, HPLC, pH Meter). +2. Each instrument exists in both **LIMS Instruments** and **Maintenance Equipment**. +3. After installing `lims_maintenance`, link each LIMS instrument to its Maintenance Equipment. +4. Maintenance operations and scheduling are now traceable directly from LIMS. + +--- + +## Unlinking +To unlink an instrument from maintenance: +1. Edit the instrument record. +2. Clear the *Maintenance Equipment* field. +3. Save the record. diff --git a/lims_maintenance/static/description/index.html b/lims_maintenance/static/description/index.html new file mode 100644 index 0000000..c9132f2 --- /dev/null +++ b/lims_maintenance/static/description/index.html @@ -0,0 +1,533 @@ + + + + + +Laboratory Information Management System (LIMS) Maintenance + + + +
+

Laboratory Information Management System (LIMS) Maintenance

+ + +

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

+

This module integrates the LIMS (Laboratory Information Management +System) with Odoo’s Maintenance application.

+

It allows each LIMS Instrument to be linked to a Maintenance +Equipment record, providing traceability and centralized management of +laboratory instruments and their maintenance schedules.

+
+

Key Features

+
    +
  • Adds a field equipment_id on the lims.instrument model.
  • +
  • Links each instrument with an equipment record from the Maintenance +module.
  • +
  • Displays the associated Maintenance Equipment directly on the +instrument form.
  • +
  • Enables maintenance tracking, scheduling, and reporting for laboratory +instruments.
  • +
+

Table of contents

+ +
+

Configuration

+
+

Prerequisites

+

Ensure the following modules are installed and configured:

+
    +
  • lims
  • +
  • maintenance
  • +
+

Both are required for this module to function properly.

+
+
+
+

Configuration Steps

+
    +
  1. Go to Maintenance → Equipment and create or configure your lab +equipment.
  2. +
  3. Open LIMS → Instruments.
  4. +
  5. In the instrument form view, select the corresponding Maintenance +Equipment record from the new “Maintenance” section.
  6. +
  7. Save your changes.
  8. +
+
+
+
+
+

Usage

+

Once configured, you can link each LIMS Instrument to its +corresponding Maintenance Equipment record.

+
+
+

Linking Instruments to Maintenance Equipment

+
    +
  1. Go to LIMS → Instruments.
  2. +
  3. Open any instrument record.
  4. +
  5. In the Maintenance section, choose a record from the Maintenance +Equipment dropdown.
  6. +
  7. Save the instrument record.
  8. +
+

The instrument is now linked to the selected maintenance equipment.

+
+
+
+

Viewing Linked Equipment

+
    +
  • Open the instrument form.
  • +
  • The linked Maintenance Equipment appears in the Maintenance +section.
  • +
  • You can click on the linked record to open the full Maintenance +Equipment form.
  • +
+
+
+
+

Example Workflow

+
    +
  1. The laboratory maintains several instruments (e.g., Spectrometer, +HPLC, pH Meter).
  2. +
  3. Each instrument exists in both LIMS Instruments and Maintenance +Equipment.
  4. +
  5. After installing lims_maintenance, link each LIMS instrument to +its Maintenance Equipment.
  6. +
  7. Maintenance operations and scheduling are now traceable directly from +LIMS.
  8. +
+
+
+
+

Unlinking

+

To unlink an instrument from maintenance:

+
    +
  1. Edit the instrument record.
  2. +
  3. Clear the Maintenance Equipment field.
  4. +
  5. Save the record.
  6. +
+
+
+
+

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

+
    +
  • Open Source Integrators
  • +
+
+ +
+

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.

+

Current maintainers:

+

max3903 jasiel-osi Nikul-OSI

+

This module is part of the OCA/connector-lims project on GitHub.

+

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

+
+
+
+
+ + diff --git a/lims_maintenance/tests/__init__.py b/lims_maintenance/tests/__init__.py new file mode 100644 index 0000000..663087f --- /dev/null +++ b/lims_maintenance/tests/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2025 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import test_lims_instrument diff --git a/lims_maintenance/tests/test_lims_instrument.py b/lims_maintenance/tests/test_lims_instrument.py new file mode 100644 index 0000000..55e405b --- /dev/null +++ b/lims_maintenance/tests/test_lims_instrument.py @@ -0,0 +1,16 @@ +# Copyright (C) 2025 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.addons.lims.tests.common import LIMSCommon + + +class TestLimsInstrument(LIMSCommon): + def setUp(self): + super().setUp() + self.equipment = self.env["maintenance.equipment"].create( + {"name": "Body Tube Change"} + ) + self.instrument.write({"equipment_id": self.equipment.id}) + + def test_link_instrument_equipment(self): + self.assertTrue(self.instrument.equipment_id) diff --git a/lims_maintenance/views/lims_instrument_views.xml b/lims_maintenance/views/lims_instrument_views.xml new file mode 100644 index 0000000..a4b1531 --- /dev/null +++ b/lims_maintenance/views/lims_instrument_views.xml @@ -0,0 +1,13 @@ + + + + lims.instrument.form.inherit + lims.instrument + + + + + + + + diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..fef89ce --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +odoo-addon-lims @ git+https://github.com/OCA/connector-lims.git@refs/pull/20/head#subdirectory=lims