Skip to content

Commit

Permalink
MIG-mgmtsystem_nonconformity-to-V.-10.0
Browse files Browse the repository at this point in the history
MIG-mgmtsystem_nonconformity-to-V.-10.0
  • Loading branch information
eugen-don committed Apr 26, 2017
1 parent 5d0b663 commit 0b72e60
Show file tree
Hide file tree
Showing 29 changed files with 534 additions and 246 deletions.
19 changes: 12 additions & 7 deletions mgmtsystem_nonconformity/README.rst
Expand Up @@ -24,7 +24,10 @@ Configuration

Users must be added to the appropriate groups within Odoo as follows:
* Creators: Settings > Users > Groups > Management System / User
* Responsible Persons: Settings > Users > Groups > Management System / Approving User
To configure email notifications for certain stages go to:
* Management System > Configuration > Nonconformities > Stages
* Click on any stage and click the edit button.
* Click on the dropdown icon in the field Email Template, select your template and click Save.

Usage
=====
Expand All @@ -43,17 +46,17 @@ To use this module:
* Procedures: Against which procedure is the NC
* Description: Evidence, reference to the standards

* Click on Save and then on Send for Analysis.
* Click on Save and then on Analysis.

As an approving user, go to the newly created NC and fill in the following
Go to the newly created NC and fill in the following
information in the tab named Causes and Analysis:

* Causes: Add root causes
* Analysis: Describe the results of the investigation
* Severity: Select the severity among unfounded, minor and major
* Immediate action: Create or select an immediate action if appropriate

Click on Approve and then on Send for Review.
Click on the Save button and then on the "Action Plan" button in the top right corner.

In the Actions tab, select or create new actions by entering the following
items:
Expand All @@ -68,8 +71,9 @@ items:
When the action is created, a notification is sent to the person responsible
for the action.

When the action plan is reviewed (comments) and approved, each action of the
plan is opened.
Enter comments into the input field below the "Plan Review" section, those comments are required to reach the next stage.

To begin the work on the planned Actions change the stage of the NC to open by clicking on the "In Progress" button in the top right corner.

When all actions of the plan are done, their effectiveness must be evaluated
before closing the NC.
Expand All @@ -92,7 +96,7 @@ In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback `here <https://github.com/OCA/
Management-system/issues/new?body=module:%20
mgmtsystem_system%0Aversion:%20
9.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
10.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Credits
=======
Expand All @@ -105,6 +109,7 @@ Contributors
* Loic Lacroix <loic.lacroix@savoirfairelinux.com>
* Sandy Carter <sandy.carter@savoirfairelinux.com>
* Gervais Naoussi <gervaisnaoussi@gmail.com>
* Eugen Don <eugen.don@don-systems.de>

Maintainer
----------
Expand Down
27 changes: 7 additions & 20 deletions mgmtsystem_nonconformity/__init__.py
@@ -1,21 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 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/>.
#
##############################################################################
from . import models, reports
# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import (
models,
reports,
)
32 changes: 9 additions & 23 deletions mgmtsystem_nonconformity/__manifest__.py
@@ -1,26 +1,9 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# 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/>.
#
##############################################################################
# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Management System - Nonconformity",
"version": "9.0.1.0.0",
"version": "10.0.1.0.0",
"author": "Savoir-faire Linux,Odoo Community Association (OCA)",
"website": "http://www.savoirfairelinux.com",
"license": "AGPL-3",
Expand All @@ -33,23 +16,26 @@
'security/ir.model.access.csv',
'security/mgmtsystem_nonconformity_security.xml',
'views/mgmtsystem_nonconformity.xml',
'views/mgmtsystem_nonconformity_stage.xml',
'views/mgmtsystem_origin.xml',
'views/mgmtsystem_cause.xml',
'views/mgmtsystem_severity.xml',
'views/mgmtsystem_action.xml',
'reports/mgmtsystem_nonconformity_report.xml',
'views/mgmtsystem_nonconformity_stage.xml',
'data/sequence.xml',
'data/mgmtsystem_nonconformity_severity.xml',
'data/mgmtsystem_nonconformity_origin.xml',
'data/mgmtsystem_nonconformity_cause.xml',
'data/mgmtsystem_nonconformity_stage.xml',
'data/mail_message_subtype.xml',
'data/email_template.xml',
'data/automated_reminder.xml',
'reports/mgmtsystem_nonconformity_report.xml',
],
"images": [],
"demo": [
"demo/mgmtsystem_nonconformity_origin.xml",
"demo/mgmtsystem_nonconformity_cause.xml",
"demo/mgmtsystem_nonconformity.xml",
],
'installable': False,
'installable': True,
}
15 changes: 15 additions & 0 deletions mgmtsystem_nonconformity/data/automated_reminder.xml
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="ir_cron_mgmtsystem_nonconformity_reminder" model="ir.cron">
<field name="name">Email Nonconformity Reminders 10 days before due date.</field>
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field eval="False" name="doall"/>
<field eval="'mgmtsystem.nonconformity'" name="model"/>
<field eval="'process_nonconformity_reminder_queue'" name="function"/>
</record>
</data>
</odoo>
191 changes: 191 additions & 0 deletions mgmtsystem_nonconformity/data/email_template.xml
@@ -0,0 +1,191 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Email templates for Nonconformity Stages -->
<data noupdate="1">

<record id="email_template_nonconformity_draft" model="mail.template">
<field name="name">Email template for stage draft</field>
<field name="email_from">${object.create_uid.company_id.email or 'noreply@localhost'}</field>
<field name="subject">${object.name}</field>
<field name="email_to">${object.manager_user_id.email},${object.responsible_user_id.email}</field>
<field name="model_id" ref="model_mgmtsystem_nonconformity"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.create_uid.partner_id.lang}</field>
<field name="body_html">
<![CDATA[
<p>Hello,</p>
<p>A new nonconformity has been assigned to you : <a href="${object.get_nonconformity_url()}">${object.get_nonconformity_url()}</a></p>
<p>${object.description}</p>
<p>
Thank you<br />
--<br />
Odoo
</p>]]>
</field>
</record>


<record id="email_template_nonconformity_analysis" model="mail.template">
<field name="name">Email template for stage analysis</field>
<field name="email_from">${object.create_uid.company_id.email or 'noreply@localhost'}</field>
<field name="subject">${object.name}</field>
<field name="email_to">${object.manager_user_id.email},${object.responsible_user_id.email}</field>
<field name="model_id" ref="model_mgmtsystem_nonconformity"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.create_uid.partner_id.lang}</field>
<field name="body_html">
<![CDATA[
<p>Hello,</p>
<p>The Analysis of a new nonconformity has been assigned to you : <a href="${object.get_nonconformity_url()}">${object.get_nonconformity_url()}</a></p>
<p>${object.description}</p>
<p>
Thank you<br />
--<br />
Odoo
</p>]]>
</field>
</record>

<record id="email_template_nonconformity_planing" model="mail.template">
<field name="name">Email template for stage pending (Action Plan)</field>
<field name="email_from">${object.create_uid.company_id.email or 'noreply@localhost'}</field>
<field name="subject">${object.name}</field>
<field name="email_to">${object.manager_user_id.email},${object.responsible_user_id.email}</field>
<field name="model_id" ref="model_mgmtsystem_nonconformity"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.create_uid.partner_id.lang}</field>
<field name="body_html">
<![CDATA[
<p>Hello,</p>
<p>The Analysis of a new nonconformity has been assigned to you : <a href="${object.get_nonconformity_url()}">${object.get_nonconformity_url()}</a></p>
<p>${object.description}</p>
<p>
Thank you<br />
--<br />
Odoo
</p>]]>
</field>
</record>

<record id="email_template_nonconformity_open" model="mail.template">
<field name="name">Email template for stage open (In Progress)</field>
<field name="email_from">${object.create_uid.company_id.email or 'noreply@localhost'}</field>
<field name="subject">${object.name}</field>
<field name="email_to">${object.manager_user_id.email},${object.responsible_user_id.email}</field>
<field name="model_id" ref="model_mgmtsystem_nonconformity"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.create_uid.partner_id.lang}</field>
<field name="body_html">
<![CDATA[
<p>Hello,</p>
<p>The Analysis of a new nonconformity has been assigned to you : <a href="${object.get_nonconformity_url()}">${object.get_nonconformity_url()}</a></p>
<p>${object.description}</p>
<p>
Thank you<br />
--<br />
Odoo
</p>]]>
</field>
</record>

<record id="email_template_nonconformity_review" model="mail.template">
<field name="name">Email template for stage evaluation</field>
<field name="email_from">${object.create_uid.company_id.email or 'noreply@localhost'}</field>
<field name="subject">${object.name}</field>
<field name="email_to">${object.manager_user_id.email},${object.responsible_user_id.email}</field>
<field name="model_id" ref="model_mgmtsystem_nonconformity"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.create_uid.partner_id.lang}</field>
<field name="body_html">
<![CDATA[
<p>Hello,</p>
<p>The Analysis of a new nonconformity has been assigned to you : <a href="${object.get_nonconformity_url()}">${object.get_nonconformity_url()}</a></p>
<p>${object.description}</p>
<p>
Thank you<br />
--<br />
Odoo
</p>]]>
</field>
</record>

<record id="email_template_nonconformity_done" model="mail.template">
<field name="name">Email template for stage done (Closed)</field>
<field name="email_from">${object.create_uid.company_id.email or 'noreply@localhost'}</field>
<field name="subject">${object.name}</field>
<field name="email_to">${object.manager_user_id.email},${object.responsible_user_id.email}</field>
<field name="model_id" ref="model_mgmtsystem_nonconformity"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.create_uid.partner_id.lang}</field>
<field name="body_html">
<![CDATA[
<p>Hello,</p>
<p>The Analysis of a new nonconformity has been assigned to you : <a href="${object.get_nonconformity_url()}">${object.get_nonconformity_url()}</a></p>
<p>${object.description}</p>
<p>
Thank you<br />
--<br />
Odoo
</p>]]>
</field>
</record>

<record id="email_template_nonconformity_cancel" model="mail.template">
<field name="name">Email template for stage cancel (Canceled)</field>
<field name="email_from">${object.create_uid.company_id.email or 'noreply@localhost'}</field>
<field name="subject">${object.name}</field>
<field name="email_to">${object.manager_user_id.email},${object.responsible_user_id.email}</field>
<field name="model_id" ref="model_mgmtsystem_nonconformity"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.create_uid.partner_id.lang}</field>
<field name="body_html">
<![CDATA[
<p>Hello,</p>
<p>The Analysis of a new nonconformity has been assigned to you : <a href="${object.get_nonconformity_url()}">${object.get_nonconformity_url()}</a></p>
<p>${object.description}</p>
<p>
Thank you<br />
--<br />
Odoo
</p>]]>
</field>
</record>

<!-- Email template for Nonconformity Reminders -->
<record id="nonconformity_email_template_reminder" model="mail.template">
<field name="name">Reminder to Manager and Responsible</field>
<field name="email_from">${object.create_uid.company_id.email or 'noreply@localhost'}</field>
<field name="subject">Reminder on Nonconformity: "${object.name}"</field>
<field name="email_to">${object.manager_user_id.email},${object.responsible_user_id.email}</field>
<field name="model_id" ref="model_mgmtsystem_nonconformity"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.create_uid.partner_id.lang}</field>
<field name="body_html">
<![CDATA[
<p>Hello,</p>
<p>
This is an automated message to remind you that the
following nonconformity is due to be completed in 10 days but still has unfinished actions (${object.date_deadline}):
<a href="${object.get_nonconformity_url()}">${object.get_nonconformity_url()}</a>
</p>
<p>
Thank you and have a nice day.<br />
--<br />
Odoo
</p>
]]>
</field>
</record>

</data>
</odoo>
1 change: 0 additions & 1 deletion mgmtsystem_nonconformity/data/mail_message_subtype.xml
Expand Up @@ -2,7 +2,6 @@
<odoo>
<data noupdate="1">

<!-- Not used at the moment. To use them override the _track_subtype method -->
<record id="subtype_analysis" model="mail.message.subtype">
<field name="name">Analysis</field>
<field name="res_model">mgmtsystem.nonconformity</field>
Expand Down
11 changes: 7 additions & 4 deletions mgmtsystem_nonconformity/data/mgmtsystem_nonconformity_stage.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="stage_draft" model="mgmtsystem.nonconformity.stage">
<field name="name">Draft</field>
<field name="sequence">0</field>
Expand All @@ -21,15 +20,19 @@
<field name="sequence">150</field>
<field name="state">open</field>
</record>
<record id="stage_evaluation" model="mgmtsystem.nonconformity.stage">
<field name="name">In evaluation</field>
<field name="sequence">200</field>
<field name="state">evaluation</field>
</record>
<record id="stage_done" model="mgmtsystem.nonconformity.stage">
<field name="name">Closed</field>
<field name="sequence">200</field>
<field name="sequence">250</field>
<field name="state">done</field>
</record>
<record id="stage_cancel" model="mgmtsystem.nonconformity.stage">
<field name="name">Cancelled</field>
<field name="sequence">250</field>
<field name="sequence">300</field>
<field name="state">cancel</field>
</record>
</data>
</odoo>

0 comments on commit 0b72e60

Please sign in to comment.