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
106 changes: 106 additions & 0 deletions mgmtsystem_review_copy_lines/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===================================
Management System Review Copy Lines
===================================

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

.. |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/license-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-NuoBiT%2Fodoo--addons-lightgray.png?logo=github
:target: https://github.com/NuoBiT/odoo-addons/tree/14.0/mgmtsystem_review_copy_lines
:alt: NuoBiT/odoo-addons

|badge1| |badge2| |badge3|

This module makes duplicating a management system review also duplicate its
review lines, and makes every duplicate start as an open review.

Out of the box, duplicating a review yields an almost empty copy: the review
lines are not carried over (One2many fields are not copied by default) and the
state of the source review is kept, so duplicating a closed review produces a
copy that is already closed and read-only.

With this module, duplicating a review:

* copies every review line (title, type, linked action or nonconformity and
decision) as new line records attached to the copy,
* always starts the copy in the *Open* state, regardless of the state of the
source review,
* keeps assigning a fresh reference to the copy, as before.

This enables a template-based workflow: keep a review with the standard set of
lines (with empty decisions) and duplicate it whenever a new review with the
same structure is needed, instead of re-creating the lines one by one.

The faithful copy of the lines is intentional: it includes the decision text
and the linked action or nonconformity of every line. When duplicating a
review that has already been filled in — instead of a template — the copied
lines carry that content over, and it must be reviewed and cleared by hand
where it does not apply to the new review.

**Table of contents**

.. contents::
:local:

Usage
=====

#. Create a template review under *Management System > Reviews* and add the
lines you want to reuse, leaving their decisions empty.
#. Whenever a new review with the same structure is needed, open the template
review and use *Action > Duplicate*.
#. The copy starts open, gets its own reference and contains a full copy of
the lines; adjust its title and date and fill in the decisions.

Lines are copied verbatim: if you duplicate a review that has already been
filled in instead of a template, the copy carries over the decision texts and
the linked actions or nonconformities of the source, and they must be
reviewed and cleared by hand.

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

Bugs are tracked on `GitHub Issues <https://github.com/NuoBiT/odoo-addons/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/NuoBiT/odoo-addons/issues/new?body=module:%20mgmtsystem_review_copy_lines%0Aversion:%2014.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
~~~~~~~

* NuoBiT Solutions
* S.L.

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

* `NuoBiT <https://www.nuobit.com>`__:

* Deniz Gallo <dgallo@nuobit.com>

Maintainers
~~~~~~~~~~~

This module is part of the `NuoBiT/odoo-addons <https://github.com/NuoBiT/odoo-addons/tree/14.0/mgmtsystem_review_copy_lines>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions mgmtsystem_review_copy_lines/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
14 changes: 14 additions & 0 deletions mgmtsystem_review_copy_lines/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2026 NuoBiT Solutions SL - Deniz Gallo <dgallo@nuobit.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Management System Review Copy Lines",
"summary": "Duplicate management system reviews together with their "
"lines so a template review can be reused",
"version": "14.0.1.0.0",
"category": "Management System",
"author": "NuoBiT Solutions, S.L.",
"website": "https://github.com/nuobit/odoo-addons",
"license": "AGPL-3",
"depends": ["mgmtsystem_review"],
}
1 change: 1 addition & 0 deletions mgmtsystem_review_copy_lines/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import mgmtsystem_review
11 changes: 11 additions & 0 deletions mgmtsystem_review_copy_lines/models/mgmtsystem_review.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2026 NuoBiT Solutions SL - Deniz Gallo <dgallo@nuobit.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class MgmtsystemReview(models.Model):
_inherit = "mgmtsystem.review"

line_ids = fields.One2many(copy=True)
state = fields.Selection(copy=False)
3 changes: 3 additions & 0 deletions mgmtsystem_review_copy_lines/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `NuoBiT <https://www.nuobit.com>`__:

* Deniz Gallo <dgallo@nuobit.com>
25 changes: 25 additions & 0 deletions mgmtsystem_review_copy_lines/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
This module makes duplicating a management system review also duplicate its
review lines, and makes every duplicate start as an open review.

Out of the box, duplicating a review yields an almost empty copy: the review
lines are not carried over (One2many fields are not copied by default) and the
state of the source review is kept, so duplicating a closed review produces a
copy that is already closed and read-only.

With this module, duplicating a review:

* copies every review line (title, type, linked action or nonconformity and
decision) as new line records attached to the copy,
* always starts the copy in the *Open* state, regardless of the state of the
source review,
* keeps assigning a fresh reference to the copy, as before.

This enables a template-based workflow: keep a review with the standard set of
lines (with empty decisions) and duplicate it whenever a new review with the
same structure is needed, instead of re-creating the lines one by one.

The faithful copy of the lines is intentional: it includes the decision text
and the linked action or nonconformity of every line. When duplicating a
review that has already been filled in — instead of a template — the copied
lines carry that content over, and it must be reviewed and cleared by hand
where it does not apply to the new review.
11 changes: 11 additions & 0 deletions mgmtsystem_review_copy_lines/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#. Create a template review under *Management System > Reviews* and add the
lines you want to reuse, leaving their decisions empty.
#. Whenever a new review with the same structure is needed, open the template
review and use *Action > Duplicate*.
#. The copy starts open, gets its own reference and contains a full copy of
the lines; adjust its title and date and fill in the decisions.

Lines are copied verbatim: if you duplicate a review that has already been
filled in instead of a template, the copy carries over the decision texts and
the linked actions or nonconformities of the source, and they must be
reviewed and cleared by hand.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading