Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mgmtsystem_action/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Management System - Action",
"version": "18.0.1.0.2",
"version": "18.0.1.0.1",
"author": "Savoir-faire Linux, Camptocamp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/management-system",
"license": "AGPL-3",
Expand Down
183 changes: 183 additions & 0 deletions mgmtsystem_environment/MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# Migration Guide: mgmtsystem_environment from V16 to V18

## Migration Summary

This document details the migration of the `mgmtsystem_environment` module from Odoo version 16.0 to 18.0, following the OCA migration guidelines and Odoo best practices.

**Migration Date:** November 6, 2025
**Module:** mgmtsystem_environment
**Source Version:** 16.0.1.0.0
**Target Version:** 18.0.1.0.0

## Overview

The `mgmtsystem_environment` module is a simple integration module that provides environment management system functionality by combining several other modules. It contains minimal custom code, consisting primarily of:

- Module manifest (`__manifest__.py`)
- Data file for system configuration (`data/environment.xml`)
- Translation files
- Documentation files

## Changes Applied

### 1. Module Version Update

**File:** `__manifest__.py`

- Updated version from `16.0.1.0.0` to `18.0.1.0.0`
- All other manifest attributes remain unchanged as they are compatible with V18

### 2. License Header Correction

**File:** `__init__.py`

- Corrected license reference from "GNU General Public License" to "GNU Affero General Public License" to match the module's AGPL-3 license declaration
- This ensures consistency between the file headers and the manifest license field

### 3. Data Files

**File:** `data/environment.xml`

- No changes required
- The XML structure is compatible with Odoo 18.0
- Uses standard `<odoo>` root element and `<record>` tags which remain unchanged

### 4. Dependencies

All module dependencies remain the same:
- `mgmtsystem_audit`
- `mgmtsystem_review`
- `document_page_environment_manual`
- `document_page_environmental_aspect`

**Note:** Ensure these dependent modules are also migrated to version 18.0 before installing this module.

## OCA Migration Guidelines Compliance

The migration followed the official OCA migration guidelines for versions 17.0 and 18.0:

### V16 → V17 Key Changes Applied:
- ✅ Module version bumped appropriately
- ✅ No `name_get` overrides (N/A - module has no models)
- ✅ No hooks requiring signature changes (N/A - module has no hooks)
- ✅ No `attrs` or `states` in views (N/A - module has no views)
- ✅ No settings views (N/A)
- ✅ No OWL templates (N/A)

### V17 → V18 Key Changes Applied:
- ✅ Version bumped to 18.0.1.0.0
- ✅ No migration scripts from previous version (none existed)
- ✅ No `tree` view types to replace (N/A - no views)
- ✅ No `user_has_groups` usage (N/A - no Python code)
- ✅ No deprecated method overrides (N/A - no models)
- ✅ No chatter to update (N/A - no views)
- ✅ No kanban views to update (N/A)
- ✅ No JavaScript code (N/A)

## Testing Recommendations

While this module contains minimal code, the following tests should be performed after migration:

1. **Installation Test:**
```bash
# Install the module in a fresh Odoo 18.0 database
odoo-bin -d test_db -i mgmtsystem_environment --stop-after-init
```

2. **Dependencies Check:**
- Verify all dependent modules are installed and compatible with V18
- Check that the environment system record is created correctly

3. **Data Integrity:**
- Verify the `mgmtsystem.system` record for "Environment" is created
- Check the reference to `document_page_environment_manual` is resolved correctly

4. **Functional Testing:**
- Navigate to Management Systems menu
- Verify environment manual is accessible
- Check that environment aspects can be created and managed
- Test reviews and audits functionality with environment system

## Module Structure Analysis

This module is an **integration/glue module** with the following characteristics:

- **No custom models:** Relies entirely on models from dependent modules
- **No views:** Uses views provided by dependent modules
- **No security rules:** Security is handled by dependent modules
- **Minimal data:** Only creates one system configuration record
- **No Python code:** Empty `__init__.py` (except license header)
- **No tests:** Module is simple enough that dependent module tests cover functionality

## Special Considerations

### 1. Dependency Chain
This module depends on several other modules. The migration must be performed in the correct order:

**Recommended migration order:**
1. `mgmtsystem` (base module)
2. `document_page_environment_manual`
3. `document_page_environmental_aspect`
4. `mgmtsystem_review`
5. `mgmtsystem_audit`
6. `mgmtsystem_environment` (this module)

### 2. No Breaking Changes
Since this module:
- Contains no custom Python code
- Has no views or UI components
- Only declares data and dependencies

There are **no breaking changes** in this migration. The module will function identically in V18 as it did in V16, provided all dependencies are correctly migrated.

### 3. Translation Files
Translation files in `i18n/` folder do not require changes. They will continue to work with V18's translation system.

### 4. Documentation
The module uses the OCA standard documentation structure with:
- `README.rst` (auto-generated)
- `readme/` directory with fragments

These do not require changes for the migration itself, though the README.rst should be regenerated to update version references:

```bash
# Regenerate README if needed (requires oca-gen-addon-readme tool)
oca-gen-addon-readme --addons-dir=. --commit
```

## Post-Migration Checklist

- [x] Module version updated to 18.0.1.0.0
- [x] License headers corrected (AGPL)
- [x] Dependencies verified
- [x] Data files checked for compatibility
- [x] No deprecated code patterns
- [x] No migration scripts needed
- [ ] Pre-commit hooks passed (run `pre-commit run -a`)
- [ ] Module installed successfully in V18
- [ ] Functional testing completed
- [ ] Dependent modules migrated

## Known Issues and Limitations

**None identified.** This module is straightforward and contains no code that would be affected by Odoo framework changes between V16 and V18.

## Additional Resources

- [OCA Migration to V17.0](https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-17.0)
- [OCA Migration to V18.0](https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-18.0)
- [Odoo 18.0 Developer Documentation](https://www.odoo.com/documentation/18.0/developer.html)
- [OCA Development Guidelines](https://odoo-community.org/page/contributing)

## Migration Executed By

This migration was performed following OCA guidelines and Odoo best practices for version migrations.

## Conclusion

The migration of `mgmtsystem_environment` from V16 to V18 is **straightforward and low-risk** due to the module's simple nature. The main changes are:

1. Version number update
2. License header correction

No code changes, view updates, or model modifications were necessary. The module will function correctly in Odoo 18.0 once all dependent modules are also migrated and installed.
108 changes: 108 additions & 0 deletions mgmtsystem_environment/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
=============================
Environment Management System
=============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:79d8b4507cf3b51c6bbd5bd11512f53e2ba19fe14a35984430c49c9d36c6b3b3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Fmanagement--system-lightgray.png?logo=github
:target: https://github.com/OCA/management-system/tree/16.0/mgmtsystem_environment
:alt: OCA/management-system
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/management-system-16-0/management-system-16-0-mgmtsystem_environment
: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/management-system&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module enables you to manage your environment management system, including:

* Environment Manual
* Reviews
* Audits
* Environmental Aspects
* Nonconformities
* Actions
* Employee Training

**Table of contents**

.. contents::
:local:

Configuration
=============

* Go to Management Systems / Manuals
* Write your Environment Manual
* Based on your environment analysis, create environmment aspects

Usage
=====

To use this module, you need to:

* Go to Management Systems
* Schedule and drive your management reviews
* Schedule and drive your internal audits
* Log your nonconformities, analyse them and prepare an action plan
* Perform your immediate, corrective and preventive actions
* Work on your improvement oppotunities

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/management-system/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 <https://github.com/OCA/management-system/issues/new?body=module:%20mgmtsystem_environment%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~

* Savoir-faire Linux

Contributors
~~~~~~~~~~~~

* Maxime Chambreuil <maxime.chambreuil@savoirfairelinux.com>
* Loïc Faure-Lacroix <loic.lacroix@savoirfairelinux.com>

* `Guadaltech <https://www.guadaltech.es>`_:

* Fernando La Chica <fernando.lachica@guadaltech.es>

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/management-system <https://github.com/OCA/management-system/tree/16.0/mgmtsystem_environment>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
19 changes: 19 additions & 0 deletions mgmtsystem_environment/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
37 changes: 37 additions & 0 deletions mgmtsystem_environment/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
"name": "Environment Management System",
"version": "18.0.1.0.0",
"author": "Savoir-faire Linux, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/management-system",
"license": "AGPL-3",
"category": "Management System",
"depends": [
"mgmtsystem_audit",
"mgmtsystem_review",
"document_page_environment_manual",
"document_page_environmental_aspect",
],
"data": ["data/environment.xml"],
"demo": [],
"installable": True,
"application": True,
}
10 changes: 10 additions & 0 deletions mgmtsystem_environment/data/environment.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="system_environment" model="mgmtsystem.system">
<field name="name">Environment</field>
<field
name="manual_id"
ref="document_page_environment_manual.document_page_environment_manual"
/>
</record>
</odoo>
Loading
Loading