← Back to team overview

openerp-community team mailing list archive

[Merge] lp:~openerp-community/openerp-mgmtsystem/7-0-fix-1137634 into lp:openerp-mgmtsystem

 

Maxime Chambreuil (http://www.savoirfairelinux.com) has proposed merging lp:~openerp-community/openerp-mgmtsystem/7-0-fix-1137634 into lp:openerp-mgmtsystem.

Requested reviews:
  Joao Alfredo Gama Batista (joao-gama)
Related bugs:
  Bug #1137634 in OpenERP Management System: "[7.0] Error when creating an Audit Verification Line"
  https://bugs.launchpad.net/openerp-mgmtsystem/+bug/1137634

For more details, see:
https://code.launchpad.net/~openerp-community/openerp-mgmtsystem/7-0-fix-1137634/+merge/156401
-- 
https://code.launchpad.net/~openerp-community/openerp-mgmtsystem/7-0-fix-1137634/+merge/156401
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openerp-mgmtsystem/7-0-fix-1137634.
=== modified file 'mgmtsystem_action/__openerp__.py'
--- mgmtsystem_action/__openerp__.py	2013-03-01 10:41:55 +0000
+++ mgmtsystem_action/__openerp__.py	2013-04-01 19:50:28 +0000
@@ -20,29 +20,27 @@
 ##############################################################################
 {
     "name" : "Management System - Action",
-    "version" : "1.0",
+    "version" : "1.1",
     "author" : "Savoir-faire Linux",
     "website" : "http://www.savoirfairelinux.com";,
     "license" : "AGPL-3",
     "category" : "Management System",
     "description": """\
-This module enables you to manage the different actions of your management system :
+This module enables you to manage the different actions of your management system:
   * immediate actions
   * corrective actions
   * preventive actions
   * improvement opportunities.
 """,
     "depends": ['mgmtsystem', 'crm_claim'],
-    "init": [
+    "data": [
         'action_sequence.xml',
         'workflow_mgmtsystem_action.xml',
-    ],
-    "data": [
         'security/ir.model.access.csv',
         'mgmtsystem_action.xml',
         'board_mgmtsystem_action.xml',
     ],
-    "demo_xml" : ['demo_action.xml',],
+    "demo" : ['demo_action.xml',],
     "installable" : True,
 }
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== modified file 'mgmtsystem_audit/mgmtsystem_audit.py'
--- mgmtsystem_audit/mgmtsystem_audit.py	2013-03-04 14:34:30 +0000
+++ mgmtsystem_audit/mgmtsystem_audit.py	2013-04-01 19:50:28 +0000
@@ -35,8 +35,7 @@
         'strong_points': fields.text('Strong Points'),
         'to_improve_points': fields.text('Points To Improve'),
         'imp_opp_ids': fields.many2many('mgmtsystem.action','mgmtsystem_audit_imp_opp_rel','mgmtsystem_action_id','mgmtsystem_audit_id','Improvement Opportunities'),
-        'nonconformity_ids': fields.many2many(
-            'mgmtsystem.nonconformity', string='Nonconformities'),
+        'nonconformity_ids': fields.many2many('mgmtsystem.nonconformity', string='Nonconformities'),
         'state': fields.selection([('open','Open'),('done','Closed')], 'State'),
         'system_id': fields.many2one('mgmtsystem.system', 'System'),
     }

=== modified file 'mgmtsystem_audit/mgmtsystem_audit.xml'
--- mgmtsystem_audit/mgmtsystem_audit.xml	2013-03-04 11:31:40 +0000
+++ mgmtsystem_audit/mgmtsystem_audit.xml	2013-04-01 19:50:28 +0000
@@ -27,7 +27,7 @@
                     <group>
                         <field name="seq"/>
                         <field name="name"/>
-                        <field name="procedure_id" domain="[('group_id','=','Procedure')]"/>
+                        <field name="procedure_id" domain="[('parent_id','in',['Procedure', 'Environmental Aspect', 'Quality Manual', 'Environment Manual'])]"/>
                         <field name="is_conformed"/>
                         <field name="comments"/>
                     </group>
@@ -45,7 +45,7 @@
                         <field name="name"/>
                         <field name="is_conformed"/>
                         <newline/>
-                        <field name="procedure_id" domain="[('group_id','=','Procedure')]"/>
+                        <field name="procedure_id" domain="[('parent_id','in',['Procedure', 'Environmental Aspect', 'Quality Manual', 'Environment Manual'])]"/>
                         <field name="seq"/>
                         <newline/>
                         <field name="comments"/>

=== removed directory 'mgmtsystem_audit/migrations/6.1.1.0'
=== removed file 'mgmtsystem_audit/migrations/6.1.1.0/openupgrade_analysis.txt'
--- mgmtsystem_audit/migrations/6.1.1.0/openupgrade_analysis.txt	2012-12-19 19:36:39 +0000
+++ mgmtsystem_audit/migrations/6.1.1.0/openupgrade_analysis.txt	1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
----mgmtsystem_audit---
-mgmtsystem_audit / mgmtsystem.audit         / state (selection)             : selection_keys is now '['done', 'open']' ('['c', 'o']')
-mgmtsystem_audit / mgmtsystem.nonconformity / audit_ids (many2many)         : NEW relation: mgmtsystem.audit
-new xml-id of model ir.model.access: mgmtsystem_audit.access_mgmtsystem_audit_viewer
-new xml-id of model ir.model.access: mgmtsystem_audit.access_mgmtsystem_verification_line_manager
-new xml-id of model ir.model.access: mgmtsystem_audit.access_mgmtsystem_verification_line_viewer
-new xml-id of model ir.ui.view: mgmtsystem_audit.view_mgmtsystem_nonconformity_form

=== removed file 'mgmtsystem_audit/migrations/6.1.1.0/post-migration.py'
--- mgmtsystem_audit/migrations/6.1.1.0/post-migration.py	2013-01-25 13:56:44 +0000
+++ mgmtsystem_audit/migrations/6.1.1.0/post-migration.py	1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-#    OpenERP, Open Source Management Solution
-#    This module 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/>.
-#
-##############################################################################
-
-import os
-from osv import osv
-import logging
-
-logger = logging.getLogger('upgrade')
-
-def migrate(cr, version):
-    logger.info("Migrating mgmtsystem_audit from version %s", version)
-
-    logger.info("Updating state flags")
-    cr.execute("update mgmtsystem_audit set state = 'open' where state = 'o'")
-    cr.execute("update mgmtsystem_audit set state = 'done' where state = 'c'")
-
-    logger.info("mgmtsystem_audit update... done!")

=== added directory 'mgmtsystem_audit/migrations/7.0.1.0'
=== added file 'mgmtsystem_audit/migrations/7.0.1.0/openupgrade_analysis.txt'
--- mgmtsystem_audit/migrations/7.0.1.0/openupgrade_analysis.txt	1970-01-01 00:00:00 +0000
+++ mgmtsystem_audit/migrations/7.0.1.0/openupgrade_analysis.txt	2013-04-01 19:50:28 +0000
@@ -0,0 +1,7 @@
+---mgmtsystem_audit---
+mgmtsystem_audit / mgmtsystem.audit         / state (selection)             : selection_keys is now '['done', 'open']' ('['c', 'o']')
+mgmtsystem_audit / mgmtsystem.nonconformity / audit_ids (many2many)         : NEW relation: mgmtsystem.audit
+new xml-id of model ir.model.access: mgmtsystem_audit.access_mgmtsystem_audit_viewer
+new xml-id of model ir.model.access: mgmtsystem_audit.access_mgmtsystem_verification_line_manager
+new xml-id of model ir.model.access: mgmtsystem_audit.access_mgmtsystem_verification_line_viewer
+new xml-id of model ir.ui.view: mgmtsystem_audit.view_mgmtsystem_nonconformity_form

=== added file 'mgmtsystem_audit/migrations/7.0.1.0/post-migration.py'
--- mgmtsystem_audit/migrations/7.0.1.0/post-migration.py	1970-01-01 00:00:00 +0000
+++ mgmtsystem_audit/migrations/7.0.1.0/post-migration.py	2013-04-01 19:50:28 +0000
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This module 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/>.
+#
+##############################################################################
+
+import os
+from osv import osv
+import logging
+
+logger = logging.getLogger('upgrade')
+
+def migrate(cr, version):
+    logger.info("Migrating mgmtsystem_audit from version %s", version)
+
+    logger.info("Updating state flags")
+    cr.execute("update mgmtsystem_audit set state = 'open' where state = 'o'")
+    cr.execute("update mgmtsystem_audit set state = 'done' where state = 'c'")
+
+    logger.info("mgmtsystem_audit update... done!")

=== removed directory 'mgmtsystem_nonconformity/migrations/6.1.1.0'
=== removed file 'mgmtsystem_nonconformity/migrations/6.1.1.0/openupgrade_analysis.txt'
--- mgmtsystem_nonconformity/migrations/6.1.1.0/openupgrade_analysis.txt	2012-12-19 19:36:39 +0000
+++ mgmtsystem_nonconformity/migrations/6.1.1.0/openupgrade_analysis.txt	1970-01-01 00:00:00 +0000
@@ -1,78 +0,0 @@
----mgmtsystem_nonconformity---
-mgmtsystem_nonconformity / mgmtsystem.action        / nonconformity_ids (many2many) : NEW relation: mgmtsystem.nonconformity
-mgmtsystem_nonconformity / mgmtsystem.action        / nonconformity_immediate_id (one2many): NEW relation: mgmtsystem.nonconformity
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / action_comments (text)        : NEW 
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / action_ids (many2many)        : NEW relation: mgmtsystem.action
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / actions_date (datetime)       : NEW 
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / actions_user_id (many2one)    : NEW relation: res.users
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / analysis_date (datetime)      : NEW 
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / analysis_user_id (many2one)   : NEW relation: res.users
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / corrective_action_id (many2one): DEL relation: mgmtsystem.action
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / effectiveness_corrective (text): DEL 
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / effectiveness_immediate (text): DEL 
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / effectiveness_preventive (text): DEL 
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / evaluation_comments (text)    : NEW 
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / evaluation_date (datetime)    : NEW 
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / evaluation_user_id (many2one) : NEW relation: res.users
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / message_ids (one2many)        : NEW relation: mail.message
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / preventive_action_id (many2one): DEL relation: mgmtsystem.action
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / severity_id (many2one)        : NEW relation: mgmtsystem.nonconformity.severity
-mgmtsystem_nonconformity / mgmtsystem.nonconformity / state (selection)             : selection_keys is now '['analysis', 'cancel', 'done', 'draft', 'open', 'pending']' ('['c', 'o']')
-mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / child_ids (one2many)          : NEW relation: mgmtsystem.nonconformity.cause
-mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / parent_id (many2one)          : NEW relation: mgmtsystem.nonconformity.cause
-mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / ref_code (char)               : NEW 
-mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / sequence (integer)            : NEW 
-mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / child_ids (one2many)          : NEW relation: mgmtsystem.nonconformity.origin
-mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / parent_id (many2one)          : NEW relation: mgmtsystem.nonconformity.origin
-mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / ref_code (char)               : NEW 
-mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / sequence (integer)            : NEW 
-mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / active (boolean)              : NEW 
-mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / description (text)            : NEW 
-mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / name (char)                   : NEW required: required
-mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / sequence (integer)            : NEW 
-new xml-id of model ir.actions.act_window: mgmtsystem_nonconformity.open_mgmtsystem_nonconformity_severity_list
-new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_cause_viewer
-new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_origin_viewer
-new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_severity_manager
-new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_severity_user
-new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_severity_viewer
-new xml-id of model ir.ui.menu: mgmtsystem_nonconformity.menu_open_nonconformity_severity
-new xml-id of model ir.ui.view: mgmtsystem_nonconformity.view_mgmtsystem_action_form
-new xml-id of model ir.ui.view: mgmtsystem_nonconformity.view_mgmtsystem_nonconformity_severity_form
-new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.bad_communication
-new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.bad_partner_relation
-new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.badly_defined_need
-new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.hr_unavailable_inadequate
-new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.information_not_available
-new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.instruction_not_respected
-new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.procedure_not_defined
-new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.procedure_not_respected
-new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.technical_failure
-new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.work_conditions
-new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_dr
-new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_extenal_audit
-new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_external_client
-new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_internal_audit
-new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_internal_client
-new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_process
-new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_qc
-new xml-id of model mgmtsystem.nonconformity.severity: mgmtsystem_nonconformity.nonconformity_severity_maj
-new xml-id of model mgmtsystem.nonconformity.severity: mgmtsystem_nonconformity.nonconformity_severity_min
-new xml-id of model mgmtsystem.nonconformity.severity: mgmtsystem_nonconformity.nonconformity_severity_no
-new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_analysis
-new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_cancel
-new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_close
-new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_draft
-new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open
-new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending
-new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_analysis_cancel
-new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_analysis_pending
-new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_draft_analysis
-new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_draft_cancel
-new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open_cancel
-new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open_close
-new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open_pending
-new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending_analysis
-new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending_cancel
-new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending_open
-new xml-id of model workflow: mgmtsystem_nonconformity.mgmtsystem_nonconformity_workflow

=== removed file 'mgmtsystem_nonconformity/migrations/6.1.1.0/post-migration.py'
--- mgmtsystem_nonconformity/migrations/6.1.1.0/post-migration.py	2013-01-25 14:10:00 +0000
+++ mgmtsystem_nonconformity/migrations/6.1.1.0/post-migration.py	1970-01-01 00:00:00 +0000
@@ -1,52 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-#    OpenERP, Open Source Management Solution
-#    This module 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/>.
-#
-##############################################################################
-
-import os
-from osv import osv
-import logging
-
-logger = logging.getLogger('upgrade')
-
-def migrate(cr, version):
-    logger.info("Migrating mgmtsystem_nonconformity from version %s", version)
-    cr.execute("select count(*) from mgmtsystem_nonconformity_action_rel")
-    rowcount = cr.fetchone()[0]
-    if rowcount == 0:
-        logger.info("Moving nonconformity/action relations to mgmtsystem_nonconformity_action_rel")
-        for action_field in ('preventive_action_id', 'immediate_action_id', 'corrective_action_id'):
-            cr.execute("insert into mgmtsystem_nonconformity_action_rel"
-               "(nonconformity_id, action_id) "
-               "(SELECT id, %s FROM "
-               " mgmtsystem_nonconformity "
-               "WHERE %s IS NOT NULL )" % (action_field, action_field))
-    else:
-        logger.warning("Attempt to migrate nonconformity action IDs failed: migration was already done.")
-
-    logger.info("Concatening action comments into evaluation_comments")
-    cr.execute("update mgmtsystem_nonconformity set evaluation_comments = "
-           "effectiveness_preventive || ' ' || effectiveness_immediate || ' ' || effectiveness_corrective "
-           "where evaluation_comments is null")
-
-    logger.info("Updating state flags")
-    cr.execute("update mgmtsystem_nonconformity set state = 'open' where state = 'o'")
-    cr.execute("update mgmtsystem_nonconformity set state = 'done' where state = 'c'")
-
-    logger.info("mgmtsystem_nonconformity update... done!")

=== added directory 'mgmtsystem_nonconformity/migrations/7.0.1.0'
=== added file 'mgmtsystem_nonconformity/migrations/7.0.1.0/openupgrade_analysis.txt'
--- mgmtsystem_nonconformity/migrations/7.0.1.0/openupgrade_analysis.txt	1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity/migrations/7.0.1.0/openupgrade_analysis.txt	2013-04-01 19:50:28 +0000
@@ -0,0 +1,78 @@
+---mgmtsystem_nonconformity---
+mgmtsystem_nonconformity / mgmtsystem.action        / nonconformity_ids (many2many) : NEW relation: mgmtsystem.nonconformity
+mgmtsystem_nonconformity / mgmtsystem.action        / nonconformity_immediate_id (one2many): NEW relation: mgmtsystem.nonconformity
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / action_comments (text)        : NEW 
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / action_ids (many2many)        : NEW relation: mgmtsystem.action
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / actions_date (datetime)       : NEW 
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / actions_user_id (many2one)    : NEW relation: res.users
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / analysis_date (datetime)      : NEW 
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / analysis_user_id (many2one)   : NEW relation: res.users
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / corrective_action_id (many2one): DEL relation: mgmtsystem.action
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / effectiveness_corrective (text): DEL 
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / effectiveness_immediate (text): DEL 
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / effectiveness_preventive (text): DEL 
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / evaluation_comments (text)    : NEW 
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / evaluation_date (datetime)    : NEW 
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / evaluation_user_id (many2one) : NEW relation: res.users
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / message_ids (one2many)        : NEW relation: mail.message
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / preventive_action_id (many2one): DEL relation: mgmtsystem.action
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / severity_id (many2one)        : NEW relation: mgmtsystem.nonconformity.severity
+mgmtsystem_nonconformity / mgmtsystem.nonconformity / state (selection)             : selection_keys is now '['analysis', 'cancel', 'done', 'draft', 'open', 'pending']' ('['c', 'o']')
+mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / child_ids (one2many)          : NEW relation: mgmtsystem.nonconformity.cause
+mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / parent_id (many2one)          : NEW relation: mgmtsystem.nonconformity.cause
+mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / ref_code (char)               : NEW 
+mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / sequence (integer)            : NEW 
+mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / child_ids (one2many)          : NEW relation: mgmtsystem.nonconformity.origin
+mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / parent_id (many2one)          : NEW relation: mgmtsystem.nonconformity.origin
+mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / ref_code (char)               : NEW 
+mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / sequence (integer)            : NEW 
+mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / active (boolean)              : NEW 
+mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / description (text)            : NEW 
+mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / name (char)                   : NEW required: required
+mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / sequence (integer)            : NEW 
+new xml-id of model ir.actions.act_window: mgmtsystem_nonconformity.open_mgmtsystem_nonconformity_severity_list
+new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_cause_viewer
+new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_origin_viewer
+new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_severity_manager
+new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_severity_user
+new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_severity_viewer
+new xml-id of model ir.ui.menu: mgmtsystem_nonconformity.menu_open_nonconformity_severity
+new xml-id of model ir.ui.view: mgmtsystem_nonconformity.view_mgmtsystem_action_form
+new xml-id of model ir.ui.view: mgmtsystem_nonconformity.view_mgmtsystem_nonconformity_severity_form
+new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.bad_communication
+new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.bad_partner_relation
+new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.badly_defined_need
+new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.hr_unavailable_inadequate
+new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.information_not_available
+new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.instruction_not_respected
+new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.procedure_not_defined
+new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.procedure_not_respected
+new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.technical_failure
+new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.work_conditions
+new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_dr
+new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_extenal_audit
+new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_external_client
+new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_internal_audit
+new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_internal_client
+new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_process
+new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_qc
+new xml-id of model mgmtsystem.nonconformity.severity: mgmtsystem_nonconformity.nonconformity_severity_maj
+new xml-id of model mgmtsystem.nonconformity.severity: mgmtsystem_nonconformity.nonconformity_severity_min
+new xml-id of model mgmtsystem.nonconformity.severity: mgmtsystem_nonconformity.nonconformity_severity_no
+new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_analysis
+new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_cancel
+new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_close
+new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_draft
+new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open
+new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending
+new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_analysis_cancel
+new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_analysis_pending
+new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_draft_analysis
+new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_draft_cancel
+new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open_cancel
+new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open_close
+new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open_pending
+new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending_analysis
+new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending_cancel
+new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending_open
+new xml-id of model workflow: mgmtsystem_nonconformity.mgmtsystem_nonconformity_workflow

=== added file 'mgmtsystem_nonconformity/migrations/7.0.1.0/post-migration.py'
--- mgmtsystem_nonconformity/migrations/7.0.1.0/post-migration.py	1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity/migrations/7.0.1.0/post-migration.py	2013-04-01 19:50:28 +0000
@@ -0,0 +1,52 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This module 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/>.
+#
+##############################################################################
+
+import os
+from osv import osv
+import logging
+
+logger = logging.getLogger('upgrade')
+
+def migrate(cr, version):
+    logger.info("Migrating mgmtsystem_nonconformity from version %s", version)
+    cr.execute("select count(*) from mgmtsystem_nonconformity_action_rel")
+    rowcount = cr.fetchone()[0]
+    if rowcount == 0:
+        logger.info("Moving nonconformity/action relations to mgmtsystem_nonconformity_action_rel")
+        for action_field in ('preventive_action_id', 'immediate_action_id', 'corrective_action_id'):
+            cr.execute("insert into mgmtsystem_nonconformity_action_rel"
+               "(nonconformity_id, action_id) "
+               "(SELECT id, %s FROM "
+               " mgmtsystem_nonconformity "
+               "WHERE %s IS NOT NULL )" % (action_field, action_field))
+    else:
+        logger.warning("Attempt to migrate nonconformity action IDs failed: migration was already done.")
+
+    logger.info("Concatening action comments into evaluation_comments")
+    cr.execute("update mgmtsystem_nonconformity set evaluation_comments = "
+           "effectiveness_preventive || ' ' || effectiveness_immediate || ' ' || effectiveness_corrective "
+           "where evaluation_comments is null")
+
+    logger.info("Updating state flags")
+    cr.execute("update mgmtsystem_nonconformity set state = 'open' where state = 'o'")
+    cr.execute("update mgmtsystem_nonconformity set state = 'done' where state = 'c'")
+
+    logger.info("mgmtsystem_nonconformity update... done!")

=== removed directory 'mgmtsystem_review/migrations/6.1.1.0'
=== removed file 'mgmtsystem_review/migrations/6.1.1.0/openupgrade_analysis.txt'
--- mgmtsystem_review/migrations/6.1.1.0/openupgrade_analysis.txt	2012-12-19 19:36:39 +0000
+++ mgmtsystem_review/migrations/6.1.1.0/openupgrade_analysis.txt	1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
----mgmtsystem_review---
-mgmtsystem_review / mgmtsystem.review        / state (selection)             : selection_keys is now '['done', 'open']' ('['c', 'o']')

=== removed file 'mgmtsystem_review/migrations/6.1.1.0/post-migration.py'
--- mgmtsystem_review/migrations/6.1.1.0/post-migration.py	2013-01-25 13:56:44 +0000
+++ mgmtsystem_review/migrations/6.1.1.0/post-migration.py	1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-#    OpenERP, Open Source Management Solution
-#    This module 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/>.
-#
-##############################################################################
-
-import os
-from osv import osv
-import logging
-
-logger = logging.getLogger('upgrade')
-
-def migrate(cr, version):
-    logger.info("Migrating mgmtsystem_review from version %s", version)
-
-    logger.info("Updating state flags")
-    cr.execute("update mgmtsystem_review set state = 'open' where state = 'o'")
-    cr.execute("update mgmtsystem_review set state = 'done' where state = 'c'")
-
-    logger.info("mgmtsystem_review update... done!")

=== added directory 'mgmtsystem_review/migrations/7.0.1.0'
=== added file 'mgmtsystem_review/migrations/7.0.1.0/openupgrade_analysis.txt'
--- mgmtsystem_review/migrations/7.0.1.0/openupgrade_analysis.txt	1970-01-01 00:00:00 +0000
+++ mgmtsystem_review/migrations/7.0.1.0/openupgrade_analysis.txt	2013-04-01 19:50:28 +0000
@@ -0,0 +1,2 @@
+---mgmtsystem_review---
+mgmtsystem_review / mgmtsystem.review        / state (selection)             : selection_keys is now '['done', 'open']' ('['c', 'o']')

=== added file 'mgmtsystem_review/migrations/7.0.1.0/post-migration.py'
--- mgmtsystem_review/migrations/7.0.1.0/post-migration.py	1970-01-01 00:00:00 +0000
+++ mgmtsystem_review/migrations/7.0.1.0/post-migration.py	2013-04-01 19:50:28 +0000
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This module 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/>.
+#
+##############################################################################
+
+import os
+from osv import osv
+import logging
+
+logger = logging.getLogger('upgrade')
+
+def migrate(cr, version):
+    logger.info("Migrating mgmtsystem_review from version %s", version)
+
+    logger.info("Updating state flags")
+    cr.execute("update mgmtsystem_review set state = 'open' where state = 'o'")
+    cr.execute("update mgmtsystem_review set state = 'done' where state = 'c'")
+
+    logger.info("mgmtsystem_review update... done!")


Follow ups