openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #01754
[Merge] lp:~openerp-community/openerp-mgmtsystem/nc-extend into lp:openerp-mgmtsystem/6.1
Daniel Reis (SECURITAS SA) has proposed merging lp:~openerp-community/openerp-mgmtsystem/nc-extend into lp:openerp-mgmtsystem/6.1.
Requested reviews:
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903)
For more details, see:
https://code.launchpad.net/~openerp-community/openerp-mgmtsystem/nc-extend/+merge/139534
Changes are done.
It's ready for review.
I ended up renaming "feedback" to "claim". Differences between mgmtsystem_claim" and "mgmtsystem_nonconformity_claim" are explained in __openerp__.py.
--
https://code.launchpad.net/~openerp-community/openerp-mgmtsystem/nc-extend/+merge/139534
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openerp-mgmtsystem/nc-extend.
=== modified file 'mgmtsystem/__openerp__.py'
--- mgmtsystem/__openerp__.py 2012-09-09 14:57:27 +0000
+++ mgmtsystem/__openerp__.py 2012-12-12 18:11:29 +0000
@@ -26,14 +26,14 @@
"license" : "GPL-3",
"category" : "Management System",
"complexity" : "normal",
- "description": """
- This module is the basis of any management system applications:
- * audit reports,
- * nonconformities,
- * immediate actions,
- * preventive actions,
- * corrective actions,
- * improvement opportunities.
+ "description": """\
+This module is the basis of any management system applications:
+ * audit reports,
+ * nonconformities,
+ * immediate actions,
+ * preventive actions,
+ * corrective actions,
+ * improvement opportunities.
""",
"depends" : ['base','board','wiki'],
"init_xml" : [],
=== added file 'mgmtsystem/i18n/pt.po'
--- mgmtsystem/i18n/pt.po 1970-01-01 00:00:00 +0000
+++ mgmtsystem/i18n/pt.po 2012-12-12 18:11:29 +0000
@@ -0,0 +1,101 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * mgmtsystem
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1-20120904-232007\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-10-29 11:38+0000\n"
+"PO-Revision-Date: 2012-10-29 11:38+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: mgmtsystem
+#: model:ir.ui.menu,name:mgmtsystem.menu_mgmtsystem_dashboard
+#: model:ir.ui.menu,name:mgmtsystem.menu_mgmtsystem_main
+#: model:ir.ui.menu,name:mgmtsystem.menu_mgmtsystem_root
+msgid "Management System"
+msgstr "Sistema de gestão"
+
+#. module: mgmtsystem
+#: model:res.groups,name:mgmtsystem.group_mgmtsystem_user
+msgid "Management System / User"
+msgstr "Sistema de gestão / Utilizador"
+
+#. module: mgmtsystem
+#: model:res.groups,name:mgmtsystem.group_mgmtsystem_user_manager
+msgid "Management System / User manager"
+msgstr "Sistema de gestão / Utilizador Gestor"
+
+#. module: mgmtsystem
+#: model:res.groups,name:mgmtsystem.group_mgmtsystem_manager
+msgid "Management System / Manager"
+msgstr "Sistema de gestão / Gestor"
+
+#. module: mgmtsystem
+#: view:board.board:0
+msgid "My Board"
+msgstr "O meu Painel"
+
+#. module: mgmtsystem
+#: field:mgmtsystem.system,company_id:0
+msgid "Company"
+msgstr "Empresa"
+
+#. module: mgmtsystem
+#: field:mgmtsystem.system,manual:0
+msgid "Manual"
+msgstr "Manual"
+
+#. module: mgmtsystem
+#: model:res.groups,name:mgmtsystem.group_mgmtsystem_viewer
+msgid "Management System / Viewer"
+msgstr "Sistema de gestão / Consulta"
+
+#. module: mgmtsystem
+#: field:mgmtsystem.system,name:0
+msgid "System"
+msgstr "Sistema"
+
+#. module: mgmtsystem
+#: model:ir.model,name:mgmtsystem.model_mgmtsystem_system
+msgid "mgmtsystem.system"
+msgstr "mgmtsystem.system"
+
+#. module: mgmtsystem
+#: model:ir.actions.act_window,name:mgmtsystem.action_system_form
+#: model:ir.ui.menu,name:mgmtsystem.menu_mgmtsystem_configuration_system
+#: view:mgmtsystem.system:0
+msgid "Systems"
+msgstr "Sistemas"
+
+#. module: mgmtsystem
+#: model:ir.actions.act_window,name:mgmtsystem.open_board_mgmtsystem
+msgid "Management System Dashboard"
+msgstr "Painel do sistema de gestão"
+
+#. module: mgmtsystem
+#: model:res.groups,comment:mgmtsystem.group_mgmtsystem_user_manager
+msgid "User with approval authority."
+msgstr "Utilizador com autoridade para aprovação."
+
+#. module: mgmtsystem
+#: model:res.groups,name:mgmtsystem.group_mgmtsystem_auditor
+msgid "Management System / Auditor"
+msgstr "Sistema de gestão / Auditor"
+
+#. module: mgmtsystem
+#: model:ir.ui.menu,name:mgmtsystem.menu_mgmtsystem_configuration
+msgid "Configuration"
+msgstr "Configuração"
+
+#. module: mgmtsystem
+#: model:ir.ui.menu,name:mgmtsystem.menu_mgmtsystem_manuals
+msgid "Manuals"
+msgstr "Manuais"
+
=== modified file 'mgmtsystem/mgmtsystem_system.py'
--- mgmtsystem/mgmtsystem_system.py 2012-04-18 19:17:22 +0000
+++ mgmtsystem/mgmtsystem_system.py 2012-12-12 18:11:29 +0000
@@ -27,7 +27,7 @@
description = 'System'
_columns = {
- 'name': fields.char('System', size=30, required=True),
+ 'name': fields.char('System', size=30, required=True, translate=True),
'manual': fields.many2one('wiki.wiki', 'Manual'),
'company_id': fields.many2one('res.company', 'Company')
}
=== modified file 'mgmtsystem/security/ir.model.access.csv'
--- mgmtsystem/security/ir.model.access.csv 2012-09-09 14:57:27 +0000
+++ mgmtsystem/security/ir.model.access.csv 2012-12-12 18:11:29 +0000
@@ -1,2 +1,10 @@
+<<<<<<< TREE
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_mgmtsystem_system","mgmtsystem.system","model_mgmtsystem_system","mgmtsystem.group_mgmtsystem_manager",1,1,1,1
+=======
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_mgmtsystem_system_user","mgmtsystem.system.user","model_mgmtsystem_system","mgmtsystem.group_mgmtsystem_user",1,0,0,0
+"access_mgmtsystem_system_viewer","mgmtsystem.system.viewer","model_mgmtsystem_system","mgmtsystem.group_mgmtsystem_viewer",1,0,0,0
+"access_mgmtsystem_system_auditor","mgmtsystem.system.auditor","model_mgmtsystem_system","mgmtsystem.group_mgmtsystem_auditor",1,0,0,0
+"access_mgmtsystem_system_manager","mgmtsystem.system.manager","model_mgmtsystem_system","mgmtsystem.group_mgmtsystem_manager",1,1,1,1
+>>>>>>> MERGE-SOURCE
=== modified file 'mgmtsystem/security/mgmtsystem_security.xml'
--- mgmtsystem/security/mgmtsystem_security.xml 2012-09-09 14:57:27 +0000
+++ mgmtsystem/security/mgmtsystem_security.xml 2012-12-12 18:11:29 +0000
@@ -2,6 +2,7 @@
<openerp>
<data noupdate="1">
+<<<<<<< TREE
<record model="ir.module.category" id="module_category_mgmtsystem">
<field name="name">Management Systems</field>
<field name="description">Helps you handle your managements systems.</field>
@@ -17,6 +18,41 @@
<field name="name">Manager</field>
<field name="category_id" ref="module_category_mgmtsystem"/>
<field name="implied_ids" eval="[(4, ref('group_mgmtsystem_auditor'))]"/>
+=======
+ <record model="ir.module.category" id="module_category_management_system">
+ <field name="name">Management System</field>
+ <field name="description">Manage management systems, manuals, KPIs, nonconformities, actions, feedbacks, audits, reviews.</field>
+ <field name="sequence">10</field>
+ </record>
+
+ <record id="mgmtsystem.group_mgmtsystem_viewer" model="res.groups">
+ <field name="name">Viewer</field>
+ <field name="category_id" ref="module_category_management_system"/>
+ </record>
+
+ <record id="mgmtsystem.group_mgmtsystem_user" model="res.groups">
+ <field name="name">User</field>
+ <field name="category_id" ref="module_category_management_system"/>
+ </record>
+
+ <record id="mgmtsystem.group_mgmtsystem_user_manager" model="res.groups">
+ <field name="name">Approving User</field>
+ <field name="comment">User with approval authority.</field>
+ <field name="category_id" ref="module_category_management_system"/>
+ <field name="implied_ids" eval="(4,ref('mgmtsystem.group_mgmtsystem_user'))"/>
+ </record>
+
+ <record id="mgmtsystem.group_mgmtsystem_manager" model="res.groups">
+ <field name="name">Manager</field>
+ <field name="category_id" ref="module_category_management_system"/>
+ <field name="implied_ids" eval="(4,ref('mgmtsystem.group_mgmtsystem_user'))"/>
+ </record>
+
+ <record id="mgmtsystem.group_mgmtsystem_auditor" model="res.groups">
+ <field name="name">Auditor</field>
+ <field name="category_id" ref="module_category_management_system"/>
+ <field name="implied_ids" eval="(4,ref('mgmtsystem.group_mgmtsystem_user'))"/>
+>>>>>>> MERGE-SOURCE
</record>
</data>
=== modified file 'mgmtsystem_action/__openerp__.py'
--- mgmtsystem_action/__openerp__.py 2012-09-09 14:18:43 +0000
+++ mgmtsystem_action/__openerp__.py 2012-12-12 18:11:29 +0000
@@ -20,7 +20,7 @@
##############################################################################
{
"name" : "Management System - Action",
- "version" : "0.1",
+ "version" : "0.2",
"author" : "Savoir-faire Linux",
"website" : "http://www.savoirfairelinux.com",
"license" : "GPL-3",
=== added file 'mgmtsystem_action/i18n/pt.po'
--- mgmtsystem_action/i18n/pt.po 1970-01-01 00:00:00 +0000
+++ mgmtsystem_action/i18n/pt.po 2012-12-12 18:11:29 +0000
@@ -0,0 +1,408 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * mgmtsystem_action
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1-20120904-232007\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-10-29 13:11+0000\n"
+"PO-Revision-Date: 2012-10-29 13:11+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,categ_id:0
+msgid "Category"
+msgstr "Categoria"
+
+#. module: mgmtsystem_action
+#: selection:mgmtsystem.action,state:0
+msgid "In Progress"
+msgstr "Em curso"
+
+#. module: mgmtsystem_action
+#: selection:mgmtsystem.action,type_action:0
+msgid "Preventive Action"
+msgstr "Ação preventiva"
+
+#. module: mgmtsystem_action
+#: help:mgmtsystem.action,state:0
+msgid "The state is set to 'Draft', when a case is created. \n"
+"If the case is in progress the state is set to 'Open'. \n"
+"When the case is over, the state is set to 'Done'. \n"
+"If the case needs to be reviewed then the state is set to 'Pending'."
+msgstr "The state is set to 'Draft', when a case is created. \n"
+"If the case is in progress the state is set to 'Open'. \n"
+"When the case is over, the state is set to 'Done'. \n"
+"If the case needs to be reviewed then the state is set to 'Pending'."
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "History Information"
+msgstr "Informação histórica"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,type_action:0
+msgid "Response Type"
+msgstr "Tipo de resposta"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+#: field:mgmtsystem.action,user_id:0
+msgid "Responsible"
+msgstr "Responsável"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,system_id:0
+msgid "System"
+msgstr "Sistema"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,partner_address_id:0
+msgid "Partner Contact"
+msgstr "Contacto no parceiro"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,priority:0
+msgid "Priority"
+msgstr "Prioridade"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "Group By..."
+msgstr "Agrupar por..."
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "Send New Email"
+msgstr "Enviar novo email"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "Details"
+msgstr "Detalhe"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+#: field:mgmtsystem.action,date_closed:0
+#: selection:mgmtsystem.action,state:0
+msgid "Closed"
+msgstr "Fechado"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "Reply"
+msgstr "Responder"
+
+#. module: mgmtsystem_action
+#: selection:mgmtsystem.action,state:0
+msgid "New"
+msgstr "Novo"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,cause:0
+msgid "Root Cause"
+msgstr "Causa principal"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "Type"
+msgstr "Tipo"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,email_from:0
+msgid "Email"
+msgstr "Email"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+#: selection:mgmtsystem.action,state:0
+msgid "Pending"
+msgstr "Pendente"
+
+#. module: mgmtsystem_action
+#: model:ir.actions.server,message:mgmtsystem_action.mgmtsystem_action_server_action
+msgid "Hello,\n"
+"<br />\n"
+"<br />\n"
+"A new action has been assigned to you:\n"
+"<br />\n"
+"<a href=\"http://localhost:8080\">http://localhost:8080</a>\n"
+"<br />\n"
+"<br />\n"
+"[[object.description]]\n"
+"<br />\n"
+"<br />\n"
+"Thank you.\n"
+"<br />\n"
+"--\n"
+"<br />\n"
+"OpenERP"
+msgstr "Hello,\n"
+"<br />\n"
+"<br />\n"
+"A new action has been assigned to you:\n"
+"<br />\n"
+"<a href=\"http://localhost:8080\">http://localhost:8080</a>\n"
+"<br />\n"
+"<br />\n"
+"[[object.description]]\n"
+"<br />\n"
+"<br />\n"
+"Thank you.\n"
+"<br />\n"
+"--\n"
+"<br />\n"
+"OpenERP"
+
+#. module: mgmtsystem_action
+#: selection:mgmtsystem.action,priority:0
+msgid "Lowest"
+msgstr "Mánima"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,action_next:0
+msgid "Next Action"
+msgstr "Próxima ação"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+#: field:mgmtsystem.action,description:0
+msgid "Description"
+msgstr "Descrição"
+
+#. module: mgmtsystem_action
+#: selection:mgmtsystem.action,priority:0
+msgid "Normal"
+msgstr "Normal"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,create_date:0
+msgid "Creation Date"
+msgstr "Data de criação"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,name:0
+msgid "Claim Subject"
+msgstr "Assunto"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,company_id:0
+msgid "Company"
+msgstr "Empresa"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,email_cc:0
+msgid "Watchers Emails"
+msgstr "Emails dr observadores (CC)"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,date_action_next:0
+msgid "Next Action Date"
+msgstr "Data da próxima ação"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,partner_phone:0
+msgid "Phone"
+msgstr "Telefone"
+
+#. module: mgmtsystem_action
+#: view:board.board:0
+#: view:mgmtsystem.action:0
+msgid "Open Actions"
+msgstr "Ações em aberto"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "User"
+msgstr "Utilizador"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "Date"
+msgstr "Data"
+
+#. module: mgmtsystem_action
+#: selection:mgmtsystem.action,priority:0
+msgid "Highest"
+msgstr "Máxima"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,stage_id:0
+msgid "Stage"
+msgstr "Etapa"
+
+#. module: mgmtsystem_action
+#: model:ir.model,name:mgmtsystem_action.model_mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "Action"
+msgstr "Ação"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "Add Internal Note"
+msgstr "Acrescentar nota interna"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,user_fault:0
+msgid "Trouble Responsible"
+msgstr "Responsál pelo problema"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,section_id:0
+msgid "Sales Team"
+msgstr "Equipa responsável"
+
+#. module: mgmtsystem_action
+#: help:mgmtsystem.action,section_id:0
+msgid "Sales team to which Case belongs to.Define Responsible user and Email account for mail gateway."
+msgstr "Equipa a quem pertence o caso. Indique o utilizador rdo responsável e o endereço de email a usar."
+
+#. module: mgmtsystem_action
+#: selection:mgmtsystem.action,type_action:0
+msgid "Immediate Action"
+msgstr "Ação imediata"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,message_ids:0
+msgid "Messages"
+msgstr "Mensagens"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,date:0
+msgid "Claim Date"
+msgstr "Data da reclamação"
+
+#. module: mgmtsystem_action
+#: selection:mgmtsystem.action,type_action:0
+msgid "Improvement Opportunity"
+msgstr "Oportundiades de melhoria"
+
+#. module: mgmtsystem_action
+#: help:mgmtsystem.action,email_from:0
+msgid "These people will receive email."
+msgstr "Estas pessoas receberão emails."
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,active:0
+msgid "Active"
+msgstr "Ativo"
+
+#. module: mgmtsystem_action
+#: model:ir.actions.server,name:mgmtsystem_action.mgmtsystem_action_server_action
+msgid "Notify the person in charge of the new action"
+msgstr "Notificar a pessoa responsál pela nova ação"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "Closed Actions"
+msgstr "Ações fechadas"
+
+#. module: mgmtsystem_action
+#: selection:mgmtsystem.action,state:0
+msgid "Cancelled"
+msgstr "Cancelado"
+
+#. module: mgmtsystem_action
+#: selection:mgmtsystem.action,type_action:0
+msgid "Corrective Action"
+msgstr "Ação corretiva"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,resolution:0
+msgid "Resolution"
+msgstr "Resolução"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,id:0
+msgid "ID"
+msgstr "ID"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "History"
+msgstr "Histórico"
+
+#. module: mgmtsystem_action
+#: help:mgmtsystem.action,email_cc:0
+msgid "These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"
+msgstr "Estes endereços de email serão acrescentados ao campo CC dos emails enviados relativos a este caso. Separe múltiplos endereços com vírgula."
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "Attachments"
+msgstr "Anexos"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,ref:0
+#: field:mgmtsystem.action,reference:0
+msgid "Reference"
+msgstr "Referência"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,state:0
+msgid "State"
+msgstr "State"
+
+#. module: mgmtsystem_action
+#: model:ir.actions.act_window,name:mgmtsystem_action.open_mgmtsystem_action_list
+#: model:ir.ui.menu,name:mgmtsystem_action.menu_open_action
+msgid "Actions"
+msgstr "Ações"
+
+#. module: mgmtsystem_action
+#: selection:mgmtsystem.action,priority:0
+msgid "High"
+msgstr "Alta"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "Global CC"
+msgstr "CC Global"
+
+#. module: mgmtsystem_action
+#: model:ir.actions.server,subject:mgmtsystem_action.mgmtsystem_action_server_action
+msgid "[[object.name]]"
+msgstr "[[object.name]]"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+#: field:mgmtsystem.action,date_deadline:0
+msgid "Deadline"
+msgstr "Prazo limite"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,write_date:0
+msgid "Update Date"
+msgstr "Data últ. atualização"
+
+#. module: mgmtsystem_action
+#: field:mgmtsystem.action,partner_id:0
+msgid "Partner"
+msgstr "Parceiro"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "Close"
+msgstr "Fechar"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "Subject"
+msgstr "Assunto"
+
+#. module: mgmtsystem_action
+#: view:mgmtsystem.action:0
+msgid "Open"
+msgstr "Aberto"
+
+#. module: mgmtsystem_action
+#: selection:mgmtsystem.action,priority:0
+msgid "Low"
+msgstr "Baixa"
+
=== modified file 'mgmtsystem_action/mgmtsystem_action.py'
--- mgmtsystem_action/mgmtsystem_action.py 2012-03-30 21:15:43 +0000
+++ mgmtsystem_action/mgmtsystem_action.py 2012-12-12 18:11:29 +0000
@@ -28,16 +28,16 @@
_inherit = "crm.claim"
_columns = {
'reference': fields.char('Reference', size=64, required=True, readonly=True),
- 'type_action': fields.selection([('immediate','Immediate Action'),
+ 'type_action': fields.selection([('immediate','Immediate Action'),
('correction','Corrective Action'),
('prevention','Preventive Action'),
('improvement','Improvement Opportunity')],
- 'Action Type'),
+ 'Response Type'),
'message_ids': fields.one2many('mail.message',
'res_id',
'Messages',
domain=[('model','=',_name)]),
- 'system_id': fields.many2one('mgmtsystem.system', 'System')
+ 'system_id': fields.many2one('mgmtsystem.system', 'System'),
}
_defaults = {
=== modified file 'mgmtsystem_action/mgmtsystem_action.xml'
--- mgmtsystem_action/mgmtsystem_action.xml 2012-08-20 18:34:19 +0000
+++ mgmtsystem_action/mgmtsystem_action.xml 2012-12-12 18:11:29 +0000
@@ -8,10 +8,11 @@
<field name="arch" type="xml">
<tree string="Action">
<field name="reference"/>
- <field name="name"/>
- <field name="description"/>
+ <field name="name" string="Subject"/>
+ <field name="type_action"/>
<field name="user_id"/>
- <field name="type_action"/>
+ <field name="date_deadline"/>
+ <field name="state"/>
</tree>
</field>
</record>
@@ -24,7 +25,7 @@
<search string="Action">
<group>
<filter name="current" icon="terp-document-new" domain="[('state','in',('draft','open','pending'))]" string="Open" help="Open Actions"/>
- <filter icon="terp-camera_test" domain="[('state','in',('cancelled','closed'))]" string="Closed" help="Closed Actions"/>
+ <filter icon="terp-camera_test" domain="[('state','in',('cancelled','done'))]" string="Closed" help="Closed Actions"/>
<separator orientation="vertical"/>
<field name="reference"/>
<field name="date" select='1'/>
@@ -47,24 +48,17 @@
<field name="arch" type="xml">
<form string="Action">
<group colspan="4" col="4">
- <group colspan="1" col="2">
- <field name="name"/>
- <field name="user_id" string="Responsible"/>
- </group>
- <group colspan="1" col="2">
- <field name="date" string="Date"/>
- <field name="type_action" required="True"/>
- </group>
- <group colspan="1" col="2">
- <field name="date_deadline" string="Deadline"/>
- <field name="reference"/>
- </group>
- <separator colspan="4" string="Action Description"/>
- <field name="description" colspan="4" nolabel="1"/>
+ <field name="name" colspan="4"/>
+ <field name="type_action" required="True"/>
+ <field name="reference"/>
+ <field name="user_id" string="Responsible" required="1"/>
+ <field name="date" string="Date"/>
+ <field name="date_deadline" string="Deadline"/>
</group>
- <group colspan="4" col="4">
-
- <notebook>
+ <notebook colspan="4">
+ <page string="Description">
+ <field name="description" colspan="4" nolabel="1"/>
+ </page>
<page string="History" groups="base.group_extended">
<group colspan="4">
<field colspan="4" name="email_cc" string="Global CC" widget="char"/>
@@ -117,12 +111,14 @@
name="%(mail.action_email_compose_message_wizard)d"
icon="terp-mail-message-new" type="action"/>
</page>
- </notebook>
- </group>
+ </notebook>
<group col="8" colspan="4">
- <field name="state" select="1"/>
+ <field name="state" widget="statusbar" statusbar_visible="draft,open,pending,done"/>
+ <button name="case_cancel" string="Cancel" states="draft,pending" type="object" icon="gtk-cancel"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
- <button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
+ <button name="case_pending" string="Pending" states="open" type="object" icon="gtk-go-forward"/>
+ <!-- Corrective actions can be already implemented when recording the NC, so they can be created and immediately closed -->
+ <button name="case_close" string="Close" states="draft,open" type="object" icon="gtk-jump-to"/>
</group>
</form>
</field>
=== modified file 'mgmtsystem_action/security/ir.model.access.csv'
--- mgmtsystem_action/security/ir.model.access.csv 2012-03-09 23:47:59 +0000
+++ mgmtsystem_action/security/ir.model.access.csv 2012-12-12 18:11:29 +0000
@@ -1,2 +1,5 @@
-"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_mgmtsystem_action","mgmtsystem.action.user","model_mgmtsystem_action","base.group_user",1,1,1,0
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_mgmtsystem_action","mgmtsystem.action.user","model_mgmtsystem_action","mgmtsystem.group_mgmtsystem_user",1,1,1,0
+"access_mgmtsystem_action_viewer","mgmtsystem.action.user.viewer","model_mgmtsystem_action","mgmtsystem.group_mgmtsystem_viewer",1,0,0,0
+"access_mgmtsystem_action_auditor","mgmtsystem.action.user.auditor","model_mgmtsystem_action","mgmtsystem.group_mgmtsystem_auditor",1,0,0,0
+"access_mgmtsystem_action_manager","mgmtsystem.action.user.manager","model_mgmtsystem_action","mgmtsystem.group_mgmtsystem_manager",1,1,1,0
=== modified file 'mgmtsystem_action/workflow_mgmtsystem_action.xml'
--- mgmtsystem_action/workflow_mgmtsystem_action.xml 2012-12-07 21:45:27 +0000
+++ mgmtsystem_action/workflow_mgmtsystem_action.xml 2012-12-12 18:11:29 +0000
@@ -4,7 +4,7 @@
<!-- Workflow -->
<record model="workflow" id="mgmtsystem_action_workflow">
- <field name="name">Management System Workflow</field>
+ <field name="name">Actions</field>
<field name="osv">mgmtsystem.action</field>
<field name="on_create">True</field>
</record>
@@ -38,7 +38,7 @@
<!-- Activities -->
<record model="workflow.activity" id="mgmtsystem_action_open">
- <field name="name">Open Management System Action</field>
+ <field name="name">Open</field>
<field name="wkf_id" ref="mgmtsystem_action_workflow"/>
<field name="kind">dummy</field>
<field name="flow_start">True</field>
@@ -48,7 +48,7 @@
</record>
<record model="workflow.activity" id="mgmtsystem_action_close">
- <field name="name">Close Management System Action</field>
+ <field name="name">Close</field>
<field name="wkf_id" ref="mgmtsystem_action_workflow"/>
<field name="kind">dummy</field>
<field name="flow_stop">True</field>
=== modified file 'mgmtsystem_audit/__openerp__.py'
--- mgmtsystem_audit/__openerp__.py 2012-09-09 14:18:43 +0000
+++ mgmtsystem_audit/__openerp__.py 2012-12-12 18:11:29 +0000
@@ -25,24 +25,23 @@
"website" : "http://www.savoirfairelinux.com",
"license" : "GPL-3",
"category" : "Management System",
- "description": """
- This module enables you to manage audits and verifications lists of
- your management system.
+ "description": """\
+This module enables you to manage audits and verifications lists of your management system.
""",
"depends" : ['mgmtsystem_nonconformity','audittrail'],
"init_xml" : [
- 'audit_sequence.xml',
+ 'audit_sequence.xml',
],
"update_xml" : [
'security/ir.model.access.csv',
- 'mgmtsystem_audit.xml',
- 'report/audit_report.xml',
- 'report/verification_list.xml',
- 'board_mgmtsystem_audit.xml',
+ 'mgmtsystem_audit.xml',
+ 'report/audit_report.xml',
+ 'report/verification_list.xml',
+ 'board_mgmtsystem_audit.xml',
'wizard/copy_verification_lines.xml',
],
"demo_xml" : [
- 'demo_audit.xml',
+ 'demo_audit.xml',
],
"installable" : True,
"certificate" : ''
=== modified file 'mgmtsystem_audit/mgmtsystem_audit.py'
--- mgmtsystem_audit/mgmtsystem_audit.py 2012-03-30 16:02:32 +0000
+++ mgmtsystem_audit/mgmtsystem_audit.py 2012-12-12 18:11:29 +0000
@@ -76,4 +76,14 @@
mgmtsystem_verification_line()
+
+class mgmtsystem_nonconformity(osv.osv):
+ _name = "mgmtsystem.nonconformity"
+ _inherit = "mgmtsystem.nonconformity"
+ _columns = {
+ 'audit_ids': fields.many2many('mgmtsystem.audit','mgmtsystem_audit_nonconformity_rel','mgmtsystem_audit_id','mgmtsystem_action_id','Related Audits'),
+ }
+mgmtsystem_nonconformity()
+
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'mgmtsystem_audit/mgmtsystem_audit.xml'
--- mgmtsystem_audit/mgmtsystem_audit.xml 2012-08-20 18:34:19 +0000
+++ mgmtsystem_audit/mgmtsystem_audit.xml 2012-12-12 18:11:29 +0000
@@ -181,5 +181,22 @@
<field name="state">subscribed</field>
</record>
+ <!-- Nonconformities related to Audits -->
+ <record id="view_mgmtsystem_nonconformity_form" model="ir.ui.view">
+ <field name="name">mgmtsystem.nonconformity.form</field>
+ <field name="model">mgmtsystem.nonconformity</field>
+ <field name="inherit_id" ref="mgmtsystem_nonconformity.view_mgmtsystem_nonconformity_form"/>
+ <field name="arch" type="xml">
+
+ <notebook position="inside">
+ <page string="Related Audits" groups="base.group_extended,mgmtsystem.group_mgmtsystem_auditor">
+ <field name="audit_ids" colspan="4" nolabel="1" />
+ </page>
+ </notebook>
+
+ </field>
+ </record>
+
+
</data>
</openerp>
=== modified file 'mgmtsystem_audit/security/ir.model.access.csv'
--- mgmtsystem_audit/security/ir.model.access.csv 2012-08-20 18:34:19 +0000
+++ mgmtsystem_audit/security/ir.model.access.csv 2012-12-12 18:11:29 +0000
@@ -1,6 +1,9 @@
-"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_mgmtsystem_audit_user","mgmtsystem.audit.user","model_mgmtsystem_audit","base.group_user",1,0,0,0
-"access_mgmtsystem_audit_auditor","mgmtsystem.audit.auditor","model_mgmtsystem_audit","mgmtsystem.group_mgmtsystem_auditor",1,1,0,0
-"access_mgmtsystem_audit_manager","mgmtsystem.audit.manager","model_mgmtsystem_audit","mgmtsystem.group_mgmtsystem_manager",1,1,1,0
-"access_mgmtsystem_verification_line_user","mgmtsystem.verification.line.user","model_mgmtsystem_verification_line","base.group_user",1,0,0,0
-"access_mgmtsystem_verification_line_auditor","mgmtsystem.verification.line.auditor","model_mgmtsystem_verification_line","mgmtsystem.group_mgmtsystem_auditor",1,1,1,1
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_mgmtsystem_audit_user","mgmtsystem.audit.user","model_mgmtsystem_audit","mgmtsystem.group_mgmtsystem_user",1,0,0,0
+"access_mgmtsystem_audit_viewer","mgmtsystem.audit.viewer","model_mgmtsystem_audit","mgmtsystem.group_mgmtsystem_viewer",1,0,0,0
+"access_mgmtsystem_audit_auditor","mgmtsystem.audit.auditor","model_mgmtsystem_audit","mgmtsystem.group_mgmtsystem_auditor",1,1,0,0
+"access_mgmtsystem_audit_manager","mgmtsystem.audit.manager","model_mgmtsystem_audit","mgmtsystem.group_mgmtsystem_manager",1,1,1,0
+"access_mgmtsystem_verification_line_user","mgmtsystem.verification.line.user","model_mgmtsystem_verification_line","mgmtsystem.group_mgmtsystem_user",1,0,0,0
+"access_mgmtsystem_verification_line_viewer","mgmtsystem.verification.line.viewer","model_mgmtsystem_verification_line","mgmtsystem.group_mgmtsystem_viewer",1,0,0,0
+"access_mgmtsystem_verification_line_auditor","mgmtsystem.verification.line.auditor","model_mgmtsystem_verification_line","mgmtsystem.group_mgmtsystem_auditor",1,1,1,1
+"access_mgmtsystem_verification_line_manager","mgmtsystem.verification.line.manager","model_mgmtsystem_verification_line","mgmtsystem.group_mgmtsystem_manager",1,1,1,1
=== modified file 'mgmtsystem_environment/__openerp__.py'
--- mgmtsystem_environment/__openerp__.py 2012-04-18 18:42:44 +0000
+++ mgmtsystem_environment/__openerp__.py 2012-12-12 18:11:29 +0000
@@ -46,6 +46,7 @@
"update_xml" : ['environment.xml'],
"demo_xml" : [],
"installable" : True,
+ "application" : True,
"certificate" : ''
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'mgmtsystem_health_safety/__openerp__.py'
--- mgmtsystem_health_safety/__openerp__.py 2012-04-18 18:39:10 +0000
+++ mgmtsystem_health_safety/__openerp__.py 2012-12-12 18:11:29 +0000
@@ -52,6 +52,7 @@
"update_xml" : ['health_safety.xml'],
"demo_xml" : [],
"installable" : True,
+ "application" : True,
"certificate" : ''
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'mgmtsystem_nonconformity/__openerp__.py'
--- mgmtsystem_nonconformity/__openerp__.py 2012-09-18 20:00:17 +0000
+++ mgmtsystem_nonconformity/__openerp__.py 2012-12-12 18:11:29 +0000
@@ -20,31 +20,31 @@
##############################################################################
{
"name" : "Management System - Nonconformity",
- "version" : "0.1",
+ "version" : "0.2",
"author" : "Savoir-faire Linux",
"website" : "http://www.savoirfairelinux.com",
"license" : "GPL-3",
"category" : "Management System",
- "description": """
- This module enables you to manage the nonconformities of your management
- system : quality (ISO9001), environment (ISO14001) or security (ISO27001).
+ "description": """\
+This module enables you to manage the nonconformities of your management
+system : quality (ISO9001), environment (ISO14001) or security (ISO27001).
""",
"depends" : [
'mgmtsystem_action',
'wiki_procedure',
],
- "init_xml" : [],
- "update_xml" : [
+ "data" : [
'security/ir.model.access.csv',
- 'mgmtsystem_nonconformity.xml',
+ 'mgmtsystem_nonconformity.xml',
+ 'mgmtsystem_nonconformity_workflow.xml',
'nonconformity_sequence.xml',
- 'board_mgmtsystem_nonconformity.xml',
+ 'board_mgmtsystem_nonconformity.xml',
+ 'mgmtsystem_nonconformity_data.xml',
],
- "demo_xml" : [
- 'demo_nonconformity.xml',
+ "demo" : [
+ 'demo_nonconformity.xml',
],
"installable" : True,
- "certificate" : ''
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'mgmtsystem_nonconformity/i18n/pt.po'
--- mgmtsystem_nonconformity/i18n/pt.po 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity/i18n/pt.po 2012-12-12 18:11:29 +0000
@@ -0,0 +1,576 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * mgmtsystem_nonconformity
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1-20120904-232007\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-12-12 10:55+0000\n"
+"PO-Revision-Date: 2012-12-12 10:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,actions_user_id:0
+msgid "Action Plan by"
+msgstr "Plano de ação por"
+
+#. module: mgmtsystem_nonconformity
+#: model:ir.actions.act_window,name:mgmtsystem_nonconformity.open_mgmtsystem_nonconformity_severity_list
+#: model:ir.ui.menu,name:mgmtsystem_nonconformity.menu_open_nonconformity_severity
+#: field:mgmtsystem.nonconformity,severity_id:0
+msgid "Severity"
+msgstr "Gravidade"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Author"
+msgstr "Autor"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.cause,name:mgmtsystem_nonconformity.procedure_not_defined
+msgid "Procedure not defined"
+msgstr "Procedimento não definido"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity.cause,ref_code:0
+#: field:mgmtsystem.nonconformity.origin,ref_code:0
+msgid "Reference Code"
+msgstr "Código Referência"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Group By..."
+msgstr "Agrupar por..."
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.severity,name:mgmtsystem_nonconformity.nonconformity_severity_min
+msgid "Minor"
+msgstr "Menor"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.cause,name:mgmtsystem_nonconformity.instruction_not_respected
+msgid "Instruction not respected"
+msgstr "Instruções não cumpridas"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Inputs"
+msgstr "Inputs"
+
+#. module: mgmtsystem_nonconformity
+#: model:ir.model,name:mgmtsystem_nonconformity.model_mgmtsystem_nonconformity_severity
+#: view:mgmtsystem.nonconformity.severity:0
+msgid "Severity of Complaints and Nonconformities"
+msgstr "Gravidade de reclamações e não conformidades"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity.severity,name:0
+msgid "Title"
+msgstr "Título"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Send for Analysis"
+msgstr "Enviar para Análise"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Send for Review"
+msgstr "Enviar para validação"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.cause,name:mgmtsystem_nonconformity.badly_defined_need
+msgid "Badly defined need"
+msgstr "Necessidade mal definida"
+
+#. module: mgmtsystem_nonconformity
+#: selection:mgmtsystem.nonconformity,state:0
+msgid "Pending Approval"
+msgstr "Aguarda aprovação"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Draft/New nonconformities"
+msgstr "Rascunho/Nova não conformidade"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Add Internal Note"
+msgstr "Adicionar nota"
+
+#. module: mgmtsystem_nonconformity
+#: help:mgmtsystem.nonconformity,evaluation_comments:0
+msgid "Conclusions from the last effectiveness evaluation."
+msgstr "Conlusões da última avaliação de eficácia."
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Closed Nonconformities"
+msgstr "Não conformidades fechadas"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity.origin:0
+msgid "Origins of nonconformity"
+msgstr "Origens da não conformidade"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,message_ids:0
+msgid "Messages"
+msgstr "Mensagens"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+#: field:mgmtsystem.nonconformity,analysis:0
+#: selection:mgmtsystem.nonconformity,state:0
+msgid "Analysis"
+msgstr "Análise"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,evaluation_user_id:0
+msgid "Evaluation by"
+msgstr "Avaliação por"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity.cause:0
+msgid "Causes of nonconformity"
+msgstr "Causas da não conformidade"
+
+#. module: mgmtsystem_nonconformity
+#: selection:mgmtsystem.nonconformity,state:0
+msgid "Cancelled"
+msgstr "Cancelada"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,origin_ids:0
+#: field:mgmtsystem.nonconformity.origin,name:0
+msgid "Origin"
+msgstr "Origem"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity.origin,child_ids:0
+msgid "Childs"
+msgstr "Descendentes"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,ref:0
+msgid "Reference"
+msgstr "Referência"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,analysis_user_id:0
+msgid "Analysis by"
+msgstr "Análise por"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.cause,name:mgmtsystem_nonconformity.bad_communication
+msgid "Bad communication"
+msgstr "Comunicação ineficaz"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,partner_id:0
+msgid "Partner"
+msgstr "Parceiro"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Effectiveness Review"
+msgstr "Avaliação de eficácia"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "History Information"
+msgstr "Informação histórica"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+#: field:mgmtsystem.nonconformity,system_id:0
+msgid "System"
+msgstr "Sistema"
+
+#. module: mgmtsystem_nonconformity
+#: model:ir.model,name:mgmtsystem_nonconformity.model_mgmtsystem_nonconformity_origin
+msgid "Origin of nonconformity of the management system"
+msgstr "Origem da não conformidade"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Send New Email"
+msgstr "Enviar novo e-mail"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Reply"
+msgstr "Responder"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity.cause,child_ids:0
+msgid "Child Causes"
+msgstr "Sub-causas"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.origin,name:mgmtsystem_nonconformity.nc_origin_external_client
+msgid "External client complaint"
+msgstr "Ocorrência com cliente externo"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.action:0
+msgid "Related Nonconformities"
+msgstr "Não conformidades relacionadas"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.cause,name:mgmtsystem_nonconformity.procedure_not_respected
+msgid "Procedure not respected"
+msgstr "prodimento não foi respeitado"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,state_name:0
+msgid "State Description"
+msgstr "Descrição do estado"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.cause,name:mgmtsystem_nonconformity.information_not_available
+msgid "Information not available"
+msgstr "Onformação não disponível"
+
+#. module: mgmtsystem_nonconformity
+#: model:ir.actions.act_window,name:mgmtsystem_nonconformity.open_mgmtsystem_nonconformity_origin_list
+#: model:ir.ui.menu,name:mgmtsystem_nonconformity.menu_open_nonconformity_origin
+#: view:mgmtsystem.nonconformity:0
+#: view:mgmtsystem.nonconformity.origin:0
+msgid "Origins"
+msgstr "Origens"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Sign Evaluation"
+msgstr "Assinar Avaliação"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Action Plan"
+msgstr "Plano de ação"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.origin,name:mgmtsystem_nonconformity.nc_origin_qc
+msgid "Quality Commitee"
+msgstr "Comité da Qualidade"
+
+#. module: mgmtsystem_nonconformity
+#: model:ir.ui.menu,name:mgmtsystem_nonconformity.menu_open_nonconformity
+msgid "Claims and Nonconformities"
+msgstr "Ocorrências e não conformidades"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Nonconformities pending review"
+msgstr "Não conformidades aguardando validação"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,author_user_id:0
+msgid "Filled in by"
+msgstr "Preenchido por"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.origin,name:mgmtsystem_nonconformity.nc_origin_process
+msgid "Process Execution"
+msgstr "Execução do processo"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.origin,name:mgmtsystem_nonconformity.nc_origin_internal_client
+msgid "Internal client complaint"
+msgstr "Ocorrêcnia com cliente interno"
+
+#. module: mgmtsystem_nonconformity
+#: help:mgmtsystem.nonconformity.cause,sequence:0
+#: help:mgmtsystem.nonconformity.origin,sequence:0
+msgid "Defines the order to present items"
+msgstr "Estabelece a ordem de apresentação"
+
+#. module: mgmtsystem_nonconformity
+#: constraint:mgmtsystem.nonconformity.cause:0
+msgid "Error! Cannot create recursive cycle."
+msgstr "Erro! Não é permitido criar ciclos recursivos."
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity.severity,active:0
+msgid "Active?"
+msgstr "Ativo?"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity.cause,parent_id:0
+#: field:mgmtsystem.nonconformity.origin,parent_id:0
+msgid "Group"
+msgstr "Grupo"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Analysis Confirmation"
+msgstr "Confirmação da análise"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,evaluation_date:0
+msgid "Evaluation Date"
+msgstr "Data da avaliação"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Reset to New"
+msgstr "Voltar a rascunho"
+
+#. module: mgmtsystem_nonconformity
+#: model:ir.ui.menu,name:mgmtsystem_nonconformity.menu_mgmtsystem_configuration_nonconformities
+#: field:mgmtsystem.action,nonconformity_ids:0
+msgid "Nonconformities"
+msgstr "Não conformidades"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+#: selection:mgmtsystem.nonconformity,state:0
+msgid "Draft"
+msgstr "Rascunho"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+#: selection:mgmtsystem.nonconformity,state:0
+msgid "Closed"
+msgstr "Fechado"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.cause,name:mgmtsystem_nonconformity.bad_partner_relation
+msgid "Bad customer/supplier relation"
+msgstr "Má relação cliente/fornecedor"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.cause,name:mgmtsystem_nonconformity.work_conditions
+msgid "Work conditions"
+msgstr "Condições de trabalho"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Start/Open"
+msgstr "Iniciar/Abrir"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.cause,name:mgmtsystem_nonconformity.technical_failure
+msgid "Technical failure"
+msgstr "Falha técnica"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Communication & History"
+msgstr "Comunicação & Histórico"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,immediate_action_id:0
+msgid "Immediate action"
+msgstr "Correção imediata"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Plan Review"
+msgstr "Validação do plano"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "User"
+msgstr "Utilizador"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.origin,name:mgmtsystem_nonconformity.nc_origin_extenal_audit
+msgid "External Audit"
+msgstr "Auditoria externa"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,date:0
+msgid "Date"
+msgstr "Data"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,analysis_date:0
+msgid "Analysis Date"
+msgstr "Data da análise"
+
+#. module: mgmtsystem_nonconformity
+#: model:ir.actions.act_window,name:mgmtsystem_nonconformity.open_mgmtsystem_nonconformity_list
+msgid "Claims and Nonconformities."
+msgstr "Ocorrências e não conformidades."
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.severity,name:mgmtsystem_nonconformity.nonconformity_severity_no
+msgid "Unfounded"
+msgstr "Sem fundamento"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,reference:0
+msgid "Related to"
+msgstr "Relativo a"
+
+#. module: mgmtsystem_nonconformity
+#: model:ir.model,name:mgmtsystem_nonconformity.model_mgmtsystem_action
+msgid "Action"
+msgstr "Ação"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+#: field:mgmtsystem.nonconformity,procedure_ids:0
+msgid "Procedure"
+msgstr "Procedimento"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "History"
+msgstr "Histórico"
+
+#. module: mgmtsystem_nonconformity
+#: model:ir.model,name:mgmtsystem_nonconformity.model_mgmtsystem_nonconformity
+msgid "Nonconformity of the management system"
+msgstr "Não conformidade do sistema de gestão"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,state:0
+msgid "State"
+msgstr "Estado"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Cancel"
+msgstr "Cancelar"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Close"
+msgstr "Fechar"
+
+#. module: mgmtsystem_nonconformity
+#: model:ir.actions.act_window,name:mgmtsystem_nonconformity.open_mgmtsystem_nonconformity_cause_list
+#: model:ir.ui.menu,name:mgmtsystem_nonconformity.menu_open_nonconformity_cause
+#: view:mgmtsystem.nonconformity:0
+#: view:mgmtsystem.nonconformity.cause:0
+msgid "Causes"
+msgstr "Causas"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+#: selection:mgmtsystem.nonconformity,state:0
+msgid "In Progress"
+msgstr "Em curso"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+#: field:mgmtsystem.nonconformity,responsible_user_id:0
+msgid "Responsible"
+msgstr "Responsável"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,actions_date:0
+msgid "Action Plan Date"
+msgstr "Data do plano de ação"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,cause_ids:0
+#: field:mgmtsystem.nonconformity.cause,name:0
+msgid "Cause"
+msgstr "Causa"
+
+#. module: mgmtsystem_nonconformity
+#: view:board.board:0
+#: view:mgmtsystem.nonconformity:0
+msgid "Open Nonconformities"
+msgstr "Não conformidades em aberto"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+#: field:mgmtsystem.nonconformity,description:0
+#: field:mgmtsystem.nonconformity.cause,description:0
+#: field:mgmtsystem.nonconformity.origin,description:0
+#: field:mgmtsystem.nonconformity.severity,description:0
+msgid "Description"
+msgstr "Descrição"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.origin,name:mgmtsystem_nonconformity.nc_origin_dr
+msgid "Direction Review"
+msgstr "Direction Review"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.origin,name:mgmtsystem_nonconformity.nc_origin_internal_audit
+msgid "Internal Audit"
+msgstr "Auditoria interna"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,evaluation_comments:0
+msgid "Evaluation Comments"
+msgstr "Comentários da avaliação"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Procedures"
+msgstr "Procedimentos"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Causes and Analysis"
+msgstr "Análise e causas"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,action_comments:0
+msgid "Action Plan Comments"
+msgstr "Comentários do plano de ação"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+msgid "Approve"
+msgstr "Aprovar"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity,id:0
+#: field:mgmtsystem.nonconformity.cause,id:0
+#: field:mgmtsystem.nonconformity.origin,id:0
+msgid "ID"
+msgstr "ID"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.severity,name:mgmtsystem_nonconformity.nonconformity_severity_maj
+msgid "Major"
+msgstr "Grave"
+
+#. module: mgmtsystem_nonconformity
+#: field:mgmtsystem.nonconformity.cause,sequence:0
+#: field:mgmtsystem.nonconformity.origin,sequence:0
+#: field:mgmtsystem.nonconformity.severity,sequence:0
+msgid "Sequence"
+msgstr "Sequência"
+
+#. module: mgmtsystem_nonconformity
+#: model:ir.model,name:mgmtsystem_nonconformity.model_mgmtsystem_nonconformity_cause
+msgid "Cause of the nonconformity of the management system"
+msgstr "Causa da não conformidade do sistema de gestão"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+#: field:mgmtsystem.nonconformity,action_ids:0
+msgid "Actions"
+msgstr "Ações"
+
+#. module: mgmtsystem_nonconformity
+#: model:mgmtsystem.nonconformity.cause,name:mgmtsystem_nonconformity.hr_unavailable_inadequate
+msgid "Human resource not available or inadequate"
+msgstr "Recursos humanos não disponíveis ou desadequados"
+
+#. module: mgmtsystem_nonconformity
+#: view:mgmtsystem.nonconformity:0
+#: field:mgmtsystem.nonconformity,manager_user_id:0
+msgid "Manager"
+msgstr "Gestor"
+
+#. module: mgmtsystem_nonconformity
+#: help:mgmtsystem.nonconformity,action_comments:0
+msgid "Comments on the action plan."
+msgstr "Observações sobre plano de ação."
+
=== modified file 'mgmtsystem_nonconformity/mgmtsystem_nonconformity.py'
--- mgmtsystem_nonconformity/mgmtsystem_nonconformity.py 2012-07-10 20:49:00 +0000
+++ mgmtsystem_nonconformity/mgmtsystem_nonconformity.py 2012-12-12 18:11:29 +0000
@@ -19,6 +19,8 @@
#
##############################################################################
+from tools.translate import _
+import netsvc as netsvc
from osv import fields, osv
import time
@@ -28,28 +30,105 @@
"""
_name = "mgmtsystem.nonconformity.cause"
_description = "Cause of the nonconformity of the management system"
+ _order = 'parent_id, sequence'
+
+ def name_get(self, cr, uid, ids, context=None):
+ ids = ids or []
+ reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
+ res = []
+ for record in reads:
+ name = record['name']
+ if record['parent_id']:
+ name = record['parent_id'][1]+' / '+name
+ res.append((record['id'], name))
+ return res
+
+ def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):
+ res = self.name_get(cr, uid, ids, context=context)
+ return dict(res)
+
+ def _check_recursion(self, cr, uid, ids, context=None, parent=None):
+ return super(mgmtsystem_nonconformity_cause, self)._check_recursion(cr, uid, ids, context=context, parent=parent)
+
_columns = {
'id': fields.integer('ID', readonly=True),
- 'name': fields.char('Cause', size=50, required=True),
- 'description': fields.text('Description')
+ 'name': fields.char('Cause', size=50, required=True, translate=True),
+ 'description': fields.text('Description'),
+ 'sequence': fields.integer('Sequence', help="Defines the order to present items"),
+ 'parent_id': fields.many2one('mgmtsystem.nonconformity.cause', 'Group'),
+ 'child_ids': fields.one2many('mgmtsystem.nonconformity.cause', 'parent_id', 'Child Causes'),
+ 'ref_code': fields.char('Reference Code', size=20),
}
-
+ _constraints = [
+ (_check_recursion, 'Error! Cannot create recursive cycle.', ['parent_id'])
+ ]
mgmtsystem_nonconformity_cause()
+
class mgmtsystem_nonconformity_origin(osv.osv):
"""
Origin of nonconformity of the management system
"""
_name = "mgmtsystem.nonconformity.origin"
_description = "Origin of nonconformity of the management system"
+ _order = 'parent_id, sequence'
+
+ def name_get(self, cr, uid, ids, context=None):
+ ids = ids or []
+ reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
+ res = []
+ for record in reads:
+ name = record['name']
+ if record['parent_id']:
+ name = record['parent_id'][1]+' / '+name
+ res.append((record['id'], name))
+ return res
+
+ def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):
+ res = self.name_get(cr, uid, ids, context=context)
+ return dict(res)
+
+ def _check_recursion(self, cr, uid, ids, context=None, parent=None):
+ return super(mgmtsystem_nonconformity_origin, self)._check_recursion(cr, uid, ids, context=context, parent=parent)
+
_columns = {
'id': fields.integer('ID', readonly=True),
- 'name': fields.char('Origin', size=50, required=True),
- 'description': fields.text('Description')
+ 'name': fields.char('Origin', size=50, required=True, translate=True),
+ 'description': fields.text('Description'),
+ 'sequence': fields.integer('Sequence', help="Defines the order to present items"),
+ 'parent_id': fields.many2one('mgmtsystem.nonconformity.origin', 'Group'),
+ 'child_ids': fields.one2many('mgmtsystem.nonconformity.origin', 'parent_id', 'Childs'),
+ 'ref_code': fields.char('Reference Code', size=20),
}
-
mgmtsystem_nonconformity_origin()
+
+class mgmtsystem_nonconformity_severity(osv.osv):
+ """Nonconformity Severity - Critical, Major, Minor, Invalid, ..."""
+ _name = "mgmtsystem.nonconformity.severity"
+ _description = "Severity of Complaints and Nonconformities"
+ _columns = {
+ 'name': fields.char('Title', size=50, required=True, translate=True),
+ 'sequence': fields.integer('Sequence',),
+ 'description': fields.text('Description', translation=True),
+ 'active': fields.boolean('Active?'),
+ }
+ _defaults = {
+ 'active': True,
+ }
+mgmtsystem_nonconformity_severity()
+
+
+_STATES = [
+ ('d', _('Draft')),
+ ('a', _('Analysis')),
+ ('p', _('Pending Approval')),
+ ('o', _('In Progress')),
+ ('c', _('Closed')),
+ ('x', _('Cancelled')),
+ ]
+_STATES_DICT = dict(_STATES)
+
class mgmtsystem_nonconformity(osv.osv):
"""
Management System - Nonconformity
@@ -57,9 +136,17 @@
_name = "mgmtsystem.nonconformity"
_description = "Nonconformity of the management system"
_rec_name = "description"
+ _inherit = ['mail.thread']
_order = "date desc"
+ def _state_name(self, cr, uid, ids, name, args, context=None):
+ res = dict()
+ for o in self.browse(cr, uid, ids, context=context):
+ res[o.id] = _STATES_DICT.get(o.state, o.state)
+ return res
+
_columns = {
+ #1. Description
'id': fields.integer('ID', readonly=True),
'ref': fields.char('Reference', size=64, required=True, readonly=True),
'date': fields.date('Date', required=True),
@@ -71,20 +158,33 @@
'origin_ids': fields.many2many('mgmtsystem.nonconformity.origin','mgmtsystem_nonconformity_origin_rel', 'nonconformity_id', 'origin_id', 'Origin', required=True),
'procedure_ids': fields.many2many('wiki.wiki','mgmtsystem_nonconformity_procedure_rel', 'nonconformity_id', 'procedure_id', 'Procedure'),
'description': fields.text('Description', required=True),
+ 'state': fields.selection(_STATES, 'State', readonly=True),
+ 'state_name': fields.function(_state_name, string='State Description', type='char', size=40),
+ 'system_id': fields.many2one('mgmtsystem.system', 'System'),
+ 'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
+ #2. Root Cause Analysis
'cause_ids': fields.many2many('mgmtsystem.nonconformity.cause','mgmtsystem_nonconformity_cause_rel', 'nonconformity_id', 'cause_id', 'Cause'),
+ 'severity_id': fields.many2one('mgmtsystem.nonconformity.severity', 'Severity'),
'analysis': fields.text('Analysis'),
- 'immediate_action_id': fields.many2one('mgmtsystem.action', 'Immediate action'),
- 'effectiveness_immediate': fields.text('Effectiveness of the immediate action'),
- 'corrective_action_id': fields.many2one('mgmtsystem.action', 'Corrective action'),
- 'effectiveness_corrective': fields.text('Effectiveness of the corrective action'),
- 'preventive_action_id': fields.many2one('mgmtsystem.action', 'Preventive action'),
- 'effectiveness_preventive': fields.text('Effectiveness of the preventive action'),
- 'state': fields.selection((('o','Open'),('c','Closed')), 'State', size=16, readonly=True),
- 'system_id': fields.many2one('mgmtsystem.system', 'System')
+ 'immediate_action_id': fields.many2one('mgmtsystem.action', 'Immediate action',
+ domain="[('nonconformity_id','=',id)]"),
+ 'analysis_date': fields.datetime('Analysis Date', readonly=True),
+ 'analysis_user_id': fields.many2one('res.users','Analysis by', readonly=True),
+ #3. Action Plan
+ 'action_ids': fields.many2many('mgmtsystem.action', 'mgmtsystem_nonconformity_action_rel', 'nonconformity_id', 'action_id', 'Actions'),
+ 'actions_date': fields.datetime('Action Plan Date', readonly=True),
+ 'actions_user_id': fields.many2one('res.users','Action Plan by', readonly=True),
+ 'action_comments': fields.text('Action Plan Comments',
+ help="Comments on the action plan."),
+ #4. Effectiveness Evaluation
+ 'evaluation_date': fields.datetime('Evaluation Date', readonly=True),
+ 'evaluation_user_id': fields.many2one('res.users','Evaluation by', readonly=True),
+ 'evaluation_comments': fields.text('Evaluation Comments',
+ help="Conclusions from the last effectiveness evaluation."),
}
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'),
- 'state': 'o',
+ 'state': 'd',
'author_user_id': lambda cr, uid, id, c={}: id,
'ref': 'NEW',
}
@@ -95,10 +195,107 @@
})
return super(mgmtsystem_nonconformity, self).create(cr, uid, vals, context)
-
- def button_close(self, cr, uid, ids, context=None):
+ def wkf_analysis(self, cr, uid, ids, context=None):
+ """Change state from draft to analysis"""
+ self.message_append(cr, uid, self.browse(cr, uid, ids), _('Analysis'))
+ return self.write(cr, uid, ids, {'state': 'a', 'analysis_date': None, 'analysis_user_id': None})
+
+ def action_sign_analysis(self, cr, uid, ids, context=None):
+ """Sign-off the analysis"""
+ o = self.browse(cr, uid, ids)[0]
+ if o.state != 'a':
+ raise osv.except_osv(_('Error !'), _('This action can only be done in the Analysis state.'))
+ if o.analysis_date:
+ raise osv.except_osv(_('Error !'), _('Analysis is already approved.'))
+ if not o.analysis:
+ raise osv.except_osv(_('Error !'), _('Please provide an analysis before approving.'))
+ vals = {'analysis_date': time.strftime('%Y-%m-%d %H:%M'), 'analysis_user_id': uid }
+ self.write(cr, uid, ids, vals, context=context)
+ self.message_append(cr, uid, self.browse(cr, uid, ids), _('Analysis Approved'))
+ return True
+
+ def wkf_review(self, cr, uid, ids, context=None):
+ """Change state from analysis to pending approval"""
+ o = self.browse(cr, uid, ids)[0]
+ if not o.analysis_date:
+ raise osv.except_osv(_('Error !'), _('Analysis must be performed before submiting to approval.'))
+ self.message_append(cr, uid, self.browse(cr, uid, ids), _('Pending Approval'))
+ return self.write(cr, uid, ids, {'state': 'p', 'actions_date': None, 'actions_user_id': None})
+
+ def action_sign_actions(self, cr, uid, ids, context=None):
+ """Sign-off the action plan"""
+ o = self.browse(cr, uid, ids)[0]
+ if o.state != 'p':
+ raise osv.except_osv(_('Error !'), _('This action can only be done in the Pending for Approval state.'))
+ if o.actions_date:
+ raise osv.except_osv(_('Error !'), _('Action plan is already approved.'))
+ if not self.browse(cr, uid, ids)[0].analysis_date:
+ raise osv.except_osv(_('Error !'), _('Analysis approved before the review confirmation.'))
+ vals = {'actions_date': time.strftime('%Y-%m-%d %H:%M'), 'actions_user_id': uid }
+ self.write(cr, uid, ids, vals, context=context)
+ self.message_append(cr, uid, self.browse(cr, uid, ids), _('Action Plan Approved'))
+ return True
+
+ def wkf_open(self, cr, uid, ids, context=None):
+ """Change state from pending approval to in progress, and Open the related actions"""
+ o = self.browse(cr, uid, ids)[0]
+ if not o.actions_date:
+ raise osv.except_osv(_('Error !'), _('Action plan must be approved before opening.'))
+ self.message_append(cr, uid, self.browse(cr, uid, ids), _('In Progress'))
+ #Open related Actions
+ if o.immediate_action_id and o.immediate_action_id.state == 'draft':
+ o.immediate_action_id.case_open(cr, uid, [o.immediate_action_id.id])
+ for a in o.action_ids:
+ if a.state == 'draft':
+ a.case_open(cr, uid, [a.id])
+ return self.write(cr, uid, ids, {'state': 'o', 'evaluation_date': None, 'evaluation_user_id': None})
+
+ def action_sign_evaluation(self, cr, uid, ids, context=None):
+ """Sign-off the effectiveness evaluation"""
+ o = self.browse(cr, uid, ids)[0]
+ if o.state != 'o':
+ raise osv.except_osv(_('Error !'), _('This action can only be done in the In Progress state.'))
+ vals = {'evaluation_date': time.strftime('%Y-%m-%d %H:%M'), 'evaluation_user_id': uid }
+ self.write(cr, uid, ids, vals, context=context)
+ self.message_append(cr, uid, self.browse(cr, uid, ids), _('Effectiveness Evaluation Approved'))
+ return True
+
+ def wkf_cancel(self, cr, uid, ids, context=None):
+ """Change state to cancel"""
+ self.message_append(cr, uid, self.browse(cr, uid, ids), _('Cancel'))
+ return self.write(cr, uid, ids, {'state': 'x'})
+
+ def wkf_close(self, cr, uid, ids, context=None):
+ """Change state from in progress to closed"""
+ o = self.browse(cr, uid, ids)[0]
+ if not o.evaluation_date:
+ raise osv.except_osv(_('Error !'), _('Effectiveness evaluation must be performed before closing.'))
+ self.message_append(cr, uid, self.browse(cr, uid, ids), _('Close'))
return self.write(cr, uid, ids, {'state': 'c'})
+ def case_reset(self, cr, uid, ids, *args):
+ """Reset to Draft and restart the workflows"""
+ wf_service = netsvc.LocalService("workflow")
+ for id in ids:
+ res = wf_service.trg_create(uid, self._name, id, cr)
+ self.message_append(cr, uid, self.browse(cr, uid, ids), _('Draft'))
+ vals = {
+ 'state': 'd',
+ 'analysis_date': None, 'analysis_user_id': None,
+ 'actions_date': None, 'actions_user_id': None,
+ 'evaluation_date': None, 'evaluation_user_id': None,
+ }
+ return self.write(cr, uid, ids, vals)
+
mgmtsystem_nonconformity()
+
+class mgmtsystem_action(osv.osv):
+ _inherit = "mgmtsystem.action"
+ _columns = {
+ 'nonconformity_immediate_id': fields.one2many('mgmtsystem.nonconformity', 'immediate_action_id', readonly=True),
+ 'nonconformity_ids': fields.many2many('mgmtsystem.nonconformity', 'mgmtsystem_nonconformity_action_rel', 'action_id', 'nonconformity_id',
+ 'Nonconformities', readonly=True),
+ }
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'mgmtsystem_nonconformity/mgmtsystem_nonconformity.xml' (properties changed: -x to +x)
--- mgmtsystem_nonconformity/mgmtsystem_nonconformity.xml 2012-09-18 20:00:17 +0000
+++ mgmtsystem_nonconformity/mgmtsystem_nonconformity.xml 2012-12-12 18:11:29 +0000
@@ -12,14 +12,16 @@
<field name="model">mgmtsystem.nonconformity</field>
<field name="type">tree</field>
<field name="arch" type="xml">
- <tree string="Nonconformity">
+ <tree>
<field name="ref"/>
- <field name="date" attrs="{'readonly':[('state','=','c')]}"/>
- <field name="partner_id" attrs="{'readonly':[('state','=','c')]}"/>
- <field name="description" attrs="{'readonly':[('state','=','c')]}"/>
- <field name="responsible_user_id" attrs="{'readonly':[('state','=','c')]}"/>
- <field name="author_user_id" attrs="{'readonly':[('state','=','c')]}"/>
- <field name="system_id"/>
+ <field name="date"/>
+ <field name="partner_id"/>
+ <field name="description"/>
+ <field name="author_user_id"/>
+ <field name="responsible_user_id"/>
+ <field name="manager_user_id"/>
+ <field name="system_id"/>
+ <field name="state"/>
</tree>
</field>
</record>
@@ -29,22 +31,45 @@
<field name="model">mgmtsystem.nonconformity</field>
<field name="type">search</field>
<field name="arch" type="xml">
- <search string="Nonconformity">
+ <search>
<group>
- <filter name="current" icon="terp-document-new" domain="[('state','=','o')]" string="Open" help="Open Nonconformities"/>
+ <filter name="draft" icon="terp-document-new" domain="[('state','=','d')]" string="Draft" help="Draft/New nonconformities"/>
+ <filter name="pending" icon="terp-gtk-media-pause" domain="[('state','in',['a','p'])]" string="Analysis" help="Nonconformities pending review"/>
+ <filter name="current" icon="terp-check" domain="[('state','=','o')]" string="In Progress" help="Open Nonconformities"/>
<filter icon="terp-camera_test" domain="[('state','=','c')]" string="Closed" help="Closed Nonconformities"/>
<separator orientation="vertical"/>
<field name="ref"/>
<field name="date"/>
+<<<<<<< TREE
<field name="author_user_id"/>
<field name="procedure_ids"/>
<field name="system_id"/>
+=======
+ <field name="author_user_id" string="User"
+ filter_domain="['|','|',('author_user_id','=',uid),('responsible_user_id','=',uid),('manager_user_id','=',uid)]" />
+ <field name="system_id"/>
+>>>>>>> MERGE-SOURCE
</group>
<newline />
<group expand="0" string="Group By...">
+<<<<<<< TREE
<filter string="Author" icon="terp-personal" domain="[]" context="{'group_by':'author_user_id'}"/>
<separator orientation="vertical"/>
<filter string="Partner" icon="terp-personal+" domain="[]" context="{'group_by':'partner_id'}"/>
+=======
+ <filter string="Author" icon="gtk-edit" context="{'group_by':'author_user_id'}"/>
+ <filter string="Responsible" icon="terp-personal" context="{'group_by':'responsible_user_id'}"/>
+ <filter string="Manager" icon="terp-personal+" context="{'group_by':'manager_user_id'}"/>
+ <separator orientation="vertical"/>
+ <filter string="System" icon="gtk-execute" context="{'group_by':'system_id'}"/>
+ <filter string="Procedure" icon="terp-stock_symbol-selection" context="{'group_by':'procedure_ids'}"/>
+ <!--
+ <separator orientation="vertical"/>
+ <filter string="Origin" icon="terp-idea" context="{'group_by':'origin_ids'}"/>
+ <filter string="Cause" icon="gtk-convert" context="{'group_by':'cause_ids'}"/>
+ <filter string="Severity" icon="stock_log" context="{'group_by':'severity_id'}"/>
+ -->
+>>>>>>> MERGE-SOURCE
</group>
</search>
</field>
@@ -55,54 +80,123 @@
<field name="type">form</field>
<field name="model">mgmtsystem.nonconformity</field>
<field name="arch" type="xml">
- <form string="Nonconformity">
+ <form>
<group colspan="2" col="2">
- <field name="ref"/>
- <field name="date" attrs="{'readonly':[('state','=','c')]}"/>
- <field name="partner_id" attrs="{'readonly':[('state','=','c')]}"/>
- <field name="reference" attrs="{'readonly':[('state','=','c')]}"/>
+ <field name="ref" attrs="{'readonly':[('state','not in',['d'])]}"/>
+ <field name="date" attrs="{'readonly':[('state','not in',['d'])]}"/>
+ <field name="partner_id" attrs="{'readonly':[('state','not in',['d','a'])]}"/>
+ <field name="reference" attrs="{'readonly':[('state','not in',['d'])]}"/>
</group>
<group colspan="2" col="2">
- <field name="responsible_user_id" attrs="{'readonly':[('state','=','c')]}"/>
- <field name="manager_user_id" attrs="{'readonly':[('state','=','c')]}"/>
- <field name="author_user_id" attrs="{'readonly':[('state','=','c')]}"/>
- <field name="system_id"/>
+ <field name="responsible_user_id" attrs="{'readonly':[('state','not in',['d','a'])]}"/>
+ <field name="manager_user_id" attrs="{'readonly':[('state','not in',['d','a'])]}"/>
+ <field name="author_user_id" attrs="{'readonly':[('state','not in',['d'])]}"/>
+ <field name="system_id" attrs="{'readonly':[('state','not in',['d','a'])]}"/>
</group>
<notebook colspan="4">
- <page string="Origins">
- <field name="origin_ids" nolabel="1" attrs="{'readonly':[('state','=','c')]}"/>
+ <page string="Inputs">
+ <separator string="Description" colspan="4"/>
+ <field name="description" nolabel="1" colspan="4" attrs="{'readonly':[('state','not in',['d','a'])]}"/>
+ <newline/>
+ <separator string="Origins" colspan="4"/>
+ <field name="origin_ids" nolabel="1" colspan="4" attrs="{'readonly':[('state','not in',['d','a'])]}"/>
</page>
<page string="Procedures">
- <field name="procedure_ids" nolabel="1" attrs="{'readonly':[('state','=','c')]}" domain="[('group_id','in',('Procedure','Environmental Aspect','Quality Manual','Environment Manual'))]"/>
- </page>
- <page string="Description">
- <field name="description" nolabel="1" attrs="{'readonly':[('state','=','c')]}"/>
- </page>
- <page string="Causes">
- <field name="cause_ids" nolabel="1" attrs="{'readonly':[('state','=','c')]}"/>
- </page>
- <page string="Analysis">
- <field name="analysis" nolabel="1" attrs="{'readonly':[('state','=','c')]}"/>
- </page>
- <page string="Actions">
- <group colspan="4">
- <field name="immediate_action_id" colspan="4" domain="[('type_action','=','immediate')]" attrs="{'readonly':[('state','=','c')]}"/>
- <newline/>
- <field name="effectiveness_immediate" colspan="4" attrs="{'readonly':[('state','=','c')]}"/>
- <separator/>
- <field name="corrective_action_id" colspan="4" domain="[('type_action','=','correction')]" attrs="{'readonly':[('state','=','c')]}"/>
- <newline/>
- <field name="effectiveness_corrective" colspan="4" attrs="{'readonly':[('state','=','c')]}"/>
- <separator/>
- <field name="preventive_action_id" colspan="4" domain="[('type_action','=','prevention')]" attrs="{'readonly':[('state','=','c')]}"/>
- <newline/>
- <field name="effectiveness_preventive" colspan="4" attrs="{'readonly':[('state','=','c')]}"/>
- </group>
- </page>
+ <field name="procedure_ids" nolabel="1" attrs="{'readonly':[('state','not in',['d','a'])]}"
+ domain="[('group_id','in',('Procedure','Environmental Aspect','Quality Manual','Environment Manual'))]"/>
+ </page>
+
+ <page string="Causes and Analysis" attrs="{'invisible':[('state','in',['d','x'])]}">
+ <separator string="Analysis" colspan="4"/>
+ <field name="analysis" nolabel="1" colspan="4"
+ attrs="{'readonly':[('state','not in',['a'])], 'required':[('state','in',['a','p','o'])]}"/>
+ <newline/>
+
+ <separator string="Causes" colspan="4"/>
+ <field name="cause_ids" nolabel="1" colspan="4" attrs="{'readonly':[('state','not in',['a'])]}"/>
+ <newline/>
+
+ <separator string="Analysis Confirmation" colspan="4"/>
+ <group colspan="2" col="2">
+ <field name="severity_id" attrs="{'readonly':[('state','not in',['a'])]}"/>
+ <field name="immediate_action_id" domain="[('type_action','=','immediate')]"
+ attrs="{'readonly':[('state','not in',['a'])]}"/>
+ </group>
+ <group colspan="2" col="2">
+ <field name="analysis_user_id"/>
+ <field name="analysis_date"/>
+ <label/>
+ <button name="action_sign_analysis" string="Approve" icon="terp-camera_test"
+ type="object" states="a"
+ groups="mgmtsystem.group_mgmtsystem_user_manager"/>
+ </group>
+ </page>
+
+ <page string="Actions" attrs="{'invisible':[('state','in',['d','a','x'])]}">
+ <separator string="Action Plan" colspan="4" />
+ <field name="action_ids" nolabel="1" colspan="4"
+ attrs="{'readonly':[('state','not in',['p'])]}"/>
+
+ <group colspan="2" col="2">
+ <separator string="Plan Review" colspan="2"/>
+ <field name="action_comments" colspan="2" nolabel="1"
+ attrs="{'readonly':[('state','not in',['p'])]}"/>
+ <field name="actions_user_id"/>
+ <field name="actions_date"/>
+ <label/>
+ <button name="action_sign_actions" string="Approve" icon="terp-camera_test"
+ type="object" states="p"
+ groups="mgmtsystem.group_mgmtsystem_user_manager"/>
+ </group>
+
+ <group colspan="2" col="2" attrs="{'invisible':[('state','not in',['o','c'])]}">
+ <separator string="Effectiveness Review" colspan="2"/>
+ <field name="evaluation_comments" nolabel="1" colspan="2"
+ attrs="{'readonly':[('state','not in',['o'])]}"/>
+ <field name="evaluation_user_id"/>
+ <field name="evaluation_date"/>
+ <label/>
+ <button name="action_sign_evaluation" string="Sign Evaluation" icon="terp-camera_test"
+ type="object" states="o"
+ groups="mgmtsystem.group_mgmtsystem_auditor"/>
+ </group>
+ </page>
+
+ <!-- Communication History -->
+ <page string="Communication & History" groups="base.group_extended">
+ <field name="message_ids" colspan="4" nolabel="1" mode="tree" readonly="1">
+ <tree string="History">
+ <field name="display_text" string="History Information"/>
+ <field name="email_from" invisible="1"/>
+ <button
+ string="Reply" attrs="{'invisible': [('email_from', '=', False)]}"
+ name="%(mail.action_email_compose_message_wizard)d"
+ context="{'mail.compose.message.mode':'reply', 'message_id':active_id}"
+ icon="terp-mail-replied" type="action" />
+ </tree>
+ </field>
+ <separator colspan="4"/>
+ <button string="Add Internal Note"
+ name="%(crm.action_crm_add_note)d"
+ context="{'model': 'crm.lead' }"
+ icon="terp-document-new" type="action" />
+ <button string="Send New Email"
+ name="%(mail.action_email_compose_message_wizard)d"
+ icon="terp-mail-message-new" type="action"/>
+
+ </page>
+
+
</notebook>
- <group colspan="4">
- <field name="state" select="1" readonly="1"/>
- <button name="button_close" string="Close" states="o" type="object" icon="gtk-jump-to"/>
+ <group col="8" colspan="4">
+ <field name="state" widget="statusbar" statusbar_visible="d,a,p,o,c"/>
+ <button name="button_cancel" string="Cancel" states="d,a,p,o" icon="gtk-cancel"/>
+ <button name="button_analysis" string="Send for Analysis" states="d,p" icon="terp-idea"/>
+ <button name="button_review" string="Send for Review" states="a,o" icon="gtk-go-up" />
+ <button name="button_open" string="Start/Open" states="p" icon="gtk-go-forward" />
+ <button name="button_close" string="Close" states="o" icon="terp-dialog-close"
+ groups="mgmtsystem.group_mgmtsystem_manager,mgmtsystem.group_mgmtsystem_auditor" />
+ <button name="case_reset" string="Reset to New" states="c,x" type="object" icon="gtk-undo"/>
</group>
</form>
</field>
@@ -115,7 +209,7 @@
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_mgmtsystem_nonconformity_tree"/>
<field name="search_view_id" ref="view_mgmtsystem_nonconformity_filter"/>
- <field name="context">{"search_default_current":1,"search_default_author_user_id":uid}</field>
+ <field name="context">{"search_default_pending":1,"search_default_current":1,"search_default_author_user_id":uid}</field>
</record>
<menuitem id="menu_open_nonconformity"
@@ -132,11 +226,11 @@
<field name="model">mgmtsystem.nonconformity.origin</field>
<field name="arch" type="xml">
<form string="Origins of nonconformity">
- <group colspan="4" col="6">
- <field name="name"/>
- <newline/>
- <field name="description"/>
- </group>
+ <field name="name"/>
+ <field name="sequence"/>
+ <field name="parent_id"/>
+ <field name="ref_code"/>
+ <field name="description" colspan="4"/>
</form>
</field>
</record>
@@ -146,9 +240,11 @@
<field name="model">mgmtsystem.nonconformity.origin</field>
<field name="type">tree</field>
<field name="arch" type="xml">
- <tree string="Origins">
+ <tree string="Origins" colors="blue:parent_id;">
+ <field name="parent_id"/>
<field name="name"/>
<field name="description"/>
+ <field name="sequence"/>
</tree>
</field>
</record>
@@ -159,6 +255,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Origins">
+ <field name="parent_id"/>
<field name="name"/>
</search>
</field>
@@ -187,11 +284,11 @@
<field name="model">mgmtsystem.nonconformity.cause</field>
<field name="arch" type="xml">
<form string="Causes of nonconformity">
- <group colspan="4" col="6">
- <field name="name"/>
- <newline/>
- <field name="description"/>
- </group>
+ <field name="name"/>
+ <field name="sequence"/>
+ <field name="parent_id"/>
+ <field name="ref_code"/>
+ <field name="description" colspan="4"/>
</form>
</field>
</record>
@@ -201,9 +298,11 @@
<field name="model">mgmtsystem.nonconformity.cause</field>
<field name="type">tree</field>
<field name="arch" type="xml">
- <tree string="Causes">
+ <tree string="Causes" colors="blue:parent_id;">
+ <field name="parent_id"/>
<field name="name"/>
<field name="description"/>
+ <field name="sequence"/>
</tree>
</field>
</record>
@@ -214,6 +313,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Causes">
+ <field name="parent_id"/>
<field name="name"/>
</search>
</field>
@@ -221,10 +321,10 @@
<record id="open_mgmtsystem_nonconformity_cause_list" model="ir.actions.act_window">
<field name="name">Causes</field>
+ <field name="type">ir.actions.act_window</field>
<field name="res_model">mgmtsystem.nonconformity.cause</field>
<field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- <field name="view_id" eval="False"/>
+ <field name="view_id" eval="view_mgmtsystem_nonconformity_cause_tree"/>
<field name="search_view_id" ref="view_mgmtsystem_nonconformity_cause_filter"/>
</record>
@@ -233,6 +333,49 @@
parent="menu_mgmtsystem_configuration_nonconformities"
sequence="30"
groups="mgmtsystem.group_mgmtsystem_manager"/>
-
+
+ <!-- Severity -->
+ <record id="view_mgmtsystem_nonconformity_severity_form" model="ir.ui.view">
+ <field name="name">mgmtsystem.nonconformity.severity.form</field>
+ <field name="type">form</field>
+ <field name="model">mgmtsystem.nonconformity.severity</field>
+ <field name="arch" type="xml">
+ <form string="Severity of Complaints and Nonconformities">
+ <field name="name"/>
+ <field name="sequence"/>
+ <field name="description" colspan="2"/>
+ <field name="active"/>
+ </form>
+ </field>
+ </record>
+
+ <record id="open_mgmtsystem_nonconformity_severity_list" model="ir.actions.act_window">
+ <field name="name">Severity</field>
+ <field name="res_model">mgmtsystem.nonconformity.severity</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ </record>
+
+ <menuitem id="menu_open_nonconformity_severity"
+ action="open_mgmtsystem_nonconformity_severity_list"
+ parent="mgmtsystem_nonconformity.menu_mgmtsystem_configuration_nonconformities"
+ groups="mgmtsystem.group_mgmtsystem_manager"/>
+
+ <!-- Actions: add link to NCs -->
+ <record id="view_mgmtsystem_action_form" model="ir.ui.view">
+ <field name="name">mgmtsystem.action.form</field>
+ <field name="model">mgmtsystem.action</field>
+ <field name="inherit_id" ref="mgmtsystem_action.view_mgmtsystem_action_form"/>
+ <field name="arch" type="xml">
+
+ <field name="description" position="after">
+ <separator string="Related Nonconformities" colspan="4"/>
+ <field name="nonconformity_ids" colspan="4" nolabel="1"
+ attrs="{'invisible':[('nonconformity_ids','=',False)]}"/>
+ </field>
+
+ </field>
+ </record>
+
</data>
</openerp>
=== added file 'mgmtsystem_nonconformity/mgmtsystem_nonconformity_data.xml'
--- mgmtsystem_nonconformity/mgmtsystem_nonconformity_data.xml 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity/mgmtsystem_nonconformity_data.xml 2012-12-12 18:11:29 +0000
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data noupdate="1">
+
+ <!-- Severity: Critical, Major, Minor, Invalid, ... -->
+ <record id="nonconformity_severity_maj" model="mgmtsystem.nonconformity.severity">
+ <field name="name">Major</field>
+ <field name="active" eval="True"/>
+ </record>
+
+ <record id="nonconformity_severity_min" model="mgmtsystem.nonconformity.severity">
+ <field name="name">Minor</field>
+ <field name="active" eval="True"/>
+ </record>
+
+ <record id="nonconformity_severity_no" model="mgmtsystem.nonconformity.severity">
+ <field name="name">Unfounded</field>
+ <field name="active" eval="True"/>
+ </record>
+
+ <!-- Origins -->
+
+ <record id="nc_origin_qc" model="mgmtsystem.nonconformity.origin">
+ <field name="name">Quality Commitee</field>
+ </record>
+
+ <record id="nc_origin_dr" model="mgmtsystem.nonconformity.origin">
+ <field name="name">Direction Review</field>
+ </record>
+
+ <record id="nc_origin_internal_client" model="mgmtsystem.nonconformity.origin">
+ <field name="name">Internal client complaint</field>
+ </record>
+
+ <record id="nc_origin_external_client" model="mgmtsystem.nonconformity.origin">
+ <field name="name">External client complaint</field>
+ </record>
+
+ <record id="nc_origin_process" model="mgmtsystem.nonconformity.origin">
+ <field name="name">Process Execution</field>
+ </record>
+
+ <record id="nc_origin_internal_audit" model="mgmtsystem.nonconformity.origin">
+ <field name="name">Internal Audit</field>
+ </record>
+
+ <record id="nc_origin_extenal_audit" model="mgmtsystem.nonconformity.origin">
+ <field name="name">External Audit</field>
+ </record>
+
+ <!-- Causes -->
+
+ <record id="badly_defined_need" model="mgmtsystem.nonconformity.cause">
+ <field name="name">Badly defined need</field>
+ </record>
+
+ <record id="work_conditions" model="mgmtsystem.nonconformity.cause">
+ <field name="name">Work conditions</field>
+ </record>
+
+ <record id="information_not_available" model="mgmtsystem.nonconformity.cause">
+ <field name="name">Information not available</field>
+ </record>
+
+ <record id="bad_communication" model="mgmtsystem.nonconformity.cause">
+ <field name="name">Bad communication</field>
+ </record>
+
+ <record id="bad_partner_relation" model="mgmtsystem.nonconformity.cause">
+ <field name="name">Bad customer/supplier relation</field>
+ </record>
+
+ <record id="hr_unavailable_inadequate" model="mgmtsystem.nonconformity.cause">
+ <field name="name">Human resource not available or inadequate</field>
+ </record>
+
+ <record id="instruction_not_respected" model="mgmtsystem.nonconformity.cause">
+ <field name="name">Instruction not respected</field>
+ </record>
+
+ <record id="procedure_not_respected" model="mgmtsystem.nonconformity.cause">
+ <field name="name">Procedure not respected</field>
+ </record>
+
+ <record id="technical_failure" model="mgmtsystem.nonconformity.cause">
+ <field name="name">Technical failure</field>
+ </record>
+
+ <record id="procedure_not_defined" model="mgmtsystem.nonconformity.cause">
+ <field name="name">Procedure not defined</field>
+ </record>
+
+ </data>
+</openerp>
=== added file 'mgmtsystem_nonconformity/mgmtsystem_nonconformity_workflow.xml'
--- mgmtsystem_nonconformity/mgmtsystem_nonconformity_workflow.xml 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity/mgmtsystem_nonconformity_workflow.xml 2012-12-12 18:11:29 +0000
@@ -0,0 +1,140 @@
+<openerp>
+ <data>
+
+ <!-- Workflow -->
+ <record model="workflow" id="mgmtsystem_nonconformity_workflow">
+ <field name="name">Nonconformity</field>
+ <field name="osv">mgmtsystem.nonconformity</field>
+ <field name="on_create">True</field>
+ </record>
+
+ <!-- Activities -->
+ <record model="workflow.activity" id="mgmtsystem_nonconformity_draft">
+ <field name="name">New/Draft</field>
+ <field name="wkf_id" ref="mgmtsystem_nonconformity_workflow"/>
+ <field name="kind">dummy</field>
+ <field name="flow_start">True</field>
+ <field name="split_mode">XOR</field>
+ <field name="join_mode">XOR</field>
+ </record>
+
+ <record model="workflow.activity" id="mgmtsystem_nonconformity_analysis">
+ <field name="name">Analysis</field>
+ <field name="wkf_id" ref="mgmtsystem_nonconformity_workflow"/>
+ <field name="kind">function</field>
+ <field name="action">wkf_analysis()</field>
+ <field name="split_mode">XOR</field>
+ <field name="join_mode">XOR</field>
+ </record>
+
+ <record model="workflow.activity" id="mgmtsystem_nonconformity_pending">
+ <field name="name">Pending</field>
+ <field name="wkf_id" ref="mgmtsystem_nonconformity_workflow"/>
+ <field name="kind">function</field>
+ <field name="action">wkf_review()</field>
+ <field name="split_mode">XOR</field>
+ <field name="join_mode">XOR</field>
+ </record>
+
+ <record model="workflow.activity" id="mgmtsystem_nonconformity_open">
+ <field name="name">Started/Opened</field>
+ <field name="wkf_id" ref="mgmtsystem_nonconformity_workflow"/>
+ <field name="kind">function</field>
+ <field name="action">wkf_open()</field>
+ <field name="split_mode">XOR</field>
+ <field name="join_mode">XOR</field>
+ </record>
+
+ <record model="workflow.activity" id="mgmtsystem_nonconformity_close">
+ <field name="name">Closed</field>
+ <field name="wkf_id" ref="mgmtsystem_nonconformity_workflow"/>
+ <field name="kind">function</field>
+ <field name="action">wkf_close()</field>
+ <field name="flow_stop">True</field>
+ <field name="split_mode">XOR</field>
+ <field name="join_mode">XOR</field>
+ </record>
+
+ <record model="workflow.activity" id="mgmtsystem_nonconformity_cancel">
+ <field name="name">Cancelled</field>
+ <field name="wkf_id" ref="mgmtsystem_nonconformity_workflow"/>
+ <field name="kind">function</field>
+ <field name="action">wkf_cancel()</field>
+ <field name="flow_stop">True</field>
+ <field name="split_mode">XOR</field>
+ <field name="join_mode">XOR</field>
+ </record>
+
+ <!-- Transitions -->
+ <record model="workflow.transition" id="mgmtsystem_nonconformity_draft_analysis">
+ <field name="act_from" ref="mgmtsystem_nonconformity_draft"/>
+ <field name="act_to" ref="mgmtsystem_nonconformity_analysis"/>
+ <field name="signal">button_analysis</field>
+ <field name="condition">True</field>
+ </record>
+
+ <record model="workflow.transition" id="mgmtsystem_nonconformity_analysis_pending">
+ <field name="act_from" ref="mgmtsystem_nonconformity_analysis"/>
+ <field name="act_to" ref="mgmtsystem_nonconformity_pending"/>
+ <field name="signal">button_review</field>
+ <field name="condition">True</field>
+ </record>
+
+ <record model="workflow.transition" id="mgmtsystem_nonconformity_pending_open">
+ <field name="act_from" ref="mgmtsystem_nonconformity_pending"/>
+ <field name="act_to" ref="mgmtsystem_nonconformity_open"/>
+ <field name="signal">button_open</field>
+ <field name="condition">True</field>
+ </record>
+
+ <record model="workflow.transition" id="mgmtsystem_nonconformity_open_pending">
+ <field name="act_from" ref="mgmtsystem_nonconformity_open"/>
+ <field name="act_to" ref="mgmtsystem_nonconformity_pending"/>
+ <field name="signal">button_review</field>
+ <field name="condition">True</field>
+ </record>
+
+ <record model="workflow.transition" id="mgmtsystem_nonconformity_pending_analysis">
+ <field name="act_from" ref="mgmtsystem_nonconformity_pending"/>
+ <field name="act_to" ref="mgmtsystem_nonconformity_analysis"/>
+ <field name="signal">button_analysis</field>
+ <field name="condition">True</field>
+ </record>
+
+ <record model="workflow.transition" id="mgmtsystem_nonconformity_open_close">
+ <field name="act_from" ref="mgmtsystem_nonconformity_open"/>
+ <field name="act_to" ref="mgmtsystem_nonconformity_close"/>
+ <field name="signal">button_close</field>
+ <field name="condition">True</field>
+ </record>
+
+ <record model="workflow.transition" id="mgmtsystem_nonconformity_draft_cancel">
+ <field name="act_from" ref="mgmtsystem_nonconformity_draft"/>
+ <field name="act_to" ref="mgmtsystem_nonconformity_cancel"/>
+ <field name="signal">button_cancel</field>
+ <field name="condition">True</field>
+ </record>
+
+ <record model="workflow.transition" id="mgmtsystem_nonconformity_analysis_cancel">
+ <field name="act_from" ref="mgmtsystem_nonconformity_analysis"/>
+ <field name="act_to" ref="mgmtsystem_nonconformity_cancel"/>
+ <field name="signal">button_cancel</field>
+ <field name="condition">True</field>
+ </record>
+
+ <record model="workflow.transition" id="mgmtsystem_nonconformity_pending_cancel">
+ <field name="act_from" ref="mgmtsystem_nonconformity_pending"/>
+ <field name="act_to" ref="mgmtsystem_nonconformity_cancel"/>
+ <field name="signal">button_cancel</field>
+ <field name="condition">True</field>
+ </record>
+
+ <record model="workflow.transition" id="mgmtsystem_nonconformity_open_cancel">
+ <field name="act_from" ref="mgmtsystem_nonconformity_open"/>
+ <field name="act_to" ref="mgmtsystem_nonconformity_cancel"/>
+ <field name="signal">button_cancel</field>
+ <field name="condition">True</field>
+ </record>
+
+ </data>
+</openerp>
=== modified file 'mgmtsystem_nonconformity/security/ir.model.access.csv'
--- mgmtsystem_nonconformity/security/ir.model.access.csv 2012-08-20 18:34:19 +0000
+++ mgmtsystem_nonconformity/security/ir.model.access.csv 2012-12-12 18:11:29 +0000
@@ -1,6 +1,12 @@
-"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_mgmtsystem_nonconformity","mgmtsystem.nonconformity.user","model_mgmtsystem_nonconformity","base.group_user",1,1,1,0
-"access_mgmtsystem_nonconformity_origin_user","mgmtsystem.nonconformity.origin.user","model_mgmtsystem_nonconformity_origin","base.group_user",1,0,0,0
-"access_mgmtsystem_nonconformity_origin_manager","mgmtsystem.nonconformity.origin.manager","model_mgmtsystem_nonconformity_origin","mgmtsystem.group_mgmtsystem_manager",1,1,1,1
-"access_mgmtsystem_nonconformity_cause_user","mgmtsystem.nonconformity.cause.user","model_mgmtsystem_nonconformity_cause","base.group_user",1,0,0,0
-"access_mgmtsystem_nonconformity_cause_manager","mgmtsystem.nonconformity.cause.manager","model_mgmtsystem_nonconformity_cause","mgmtsystem.group_mgmtsystem_manager",1,1,1,1
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_mgmtsystem_nonconformity","mgmtsystem.nonconformity.user","model_mgmtsystem_nonconformity","mgmtsystem.group_mgmtsystem_user",1,1,1,0
+"access_mgmtsystem_nonconformity","mgmtsystem.nonconformity.viewer","model_mgmtsystem_nonconformity","mgmtsystem.group_mgmtsystem_viewer",1,0,0,0
+"access_mgmtsystem_nonconformity_origin_user","mgmtsystem.nonconformity.origin.user","model_mgmtsystem_nonconformity_origin","mgmtsystem.group_mgmtsystem_user",1,0,0,0
+"access_mgmtsystem_nonconformity_origin_viewer","mgmtsystem.nonconformity.origin.viewer","model_mgmtsystem_nonconformity_origin","mgmtsystem.group_mgmtsystem_viewer",1,0,0,0
+"access_mgmtsystem_nonconformity_origin_manager","mgmtsystem.nonconformity.origin.manager","model_mgmtsystem_nonconformity_origin","mgmtsystem.group_mgmtsystem_manager",1,1,1,1
+"access_mgmtsystem_nonconformity_cause_user","mgmtsystem.nonconformity.cause.user","model_mgmtsystem_nonconformity_cause","mgmtsystem.group_mgmtsystem_user",1,0,0,0
+"access_mgmtsystem_nonconformity_cause_viewer","mgmtsystem.nonconformity.cause.viewer","model_mgmtsystem_nonconformity_cause","mgmtsystem.group_mgmtsystem_viewer",1,0,0,0
+"access_mgmtsystem_nonconformity_cause_manager","mgmtsystem.nonconformity.cause.manager","model_mgmtsystem_nonconformity_cause","mgmtsystem.group_mgmtsystem_manager",1,1,1,1
+"access_mgmtsystem_nonconformity_severity_user","mgmtsystem.nonconformity.severity.user","model_mgmtsystem_nonconformity_severity","mgmtsystem.group_mgmtsystem_user",1,0,0,0
+"access_mgmtsystem_nonconformity_severity_viewer","mgmtsystem.nonconformity.severity.viewer","model_mgmtsystem_nonconformity_severity","mgmtsystem.group_mgmtsystem_viewer",1,0,0,0
+"access_mgmtsystem_nonconformity_severity_manager","mgmtsystem.nonconformity.severity.manager","model_mgmtsystem_nonconformity_severity","mgmtsystem.group_mgmtsystem_manager",1,1,1,1
=== added directory 'mgmtsystem_nonconformity_analytic'
=== added file 'mgmtsystem_nonconformity_analytic/__init__.py'
--- mgmtsystem_nonconformity_analytic/__init__.py 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_analytic/__init__.py 2012-12-12 18:11:29 +0000
@@ -0,0 +1,3 @@
+# -*- encoding: utf-8 -*-
+import mgmtsystem_nonconformity
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'mgmtsystem_nonconformity_analytic/__openerp__.py'
--- mgmtsystem_nonconformity_analytic/__openerp__.py 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_analytic/__openerp__.py 2012-12-12 18:11:29 +0000
@@ -0,0 +1,31 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2012 Daniel Reis
+#
+# 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" : "Management System Nonconformity - Analytic Account",
+ "version" : "0.1",
+ "author" : "Daniel Reis",
+ "category" : "Management System",
+ "description": """Add Analytic Accounts / Contracts to Non Conformities""",
+ "depends" : ['mgmtsystem_nonconformity', 'analytic'],
+ "data" : ['mgmtsystem_nonconformity.xml'],
+ "installable" : True,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
=== added directory 'mgmtsystem_nonconformity_analytic/i18n'
=== added file 'mgmtsystem_nonconformity_analytic/i18n/pt.po'
--- mgmtsystem_nonconformity_analytic/i18n/pt.po 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_analytic/i18n/pt.po 2012-12-12 18:11:29 +0000
@@ -0,0 +1,27 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * mgmtsystem_nonconformity_analytic
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1-20120904-232007\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-10-29 12:01+0000\n"
+"PO-Revision-Date: 2012-10-29 12:01+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: mgmtsystem_nonconformity_analytic
+#: model:ir.model,name:mgmtsystem_nonconformity_analytic.model_mgmtsystem_nonconformity
+msgid "Nonconformity of the management system"
+msgstr "Não conformidade do sistema de gestão"
+
+#. module: mgmtsystem_nonconformity_analytic
+#: field:mgmtsystem.nonconformity,analytic_account_id:0
+msgid "Contract"
+msgstr "Contrato"
+
=== added file 'mgmtsystem_nonconformity_analytic/mgmtsystem_nonconformity.py'
--- mgmtsystem_nonconformity_analytic/mgmtsystem_nonconformity.py 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_analytic/mgmtsystem_nonconformity.py 2012-12-12 18:11:29 +0000
@@ -0,0 +1,30 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2012 Daniel Reis
+#
+# 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 osv import fields, osv
+
+class mgmtsystem_nonconformity(osv.osv):
+ _inherit = "mgmtsystem.nonconformity"
+ _columns = {
+ 'analytic_account_id': fields.many2one('account.analytic.account', 'Contract'),
+ }
+mgmtsystem_nonconformity()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'mgmtsystem_nonconformity_analytic/mgmtsystem_nonconformity.xml'
--- mgmtsystem_nonconformity_analytic/mgmtsystem_nonconformity.xml 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_analytic/mgmtsystem_nonconformity.xml 2012-12-12 18:11:29 +0000
@@ -0,0 +1,18 @@
+<openerp>
+ <data>
+
+ <record id="view_mgmtsystem_nonconformity_form" model="ir.ui.view">
+ <field name="name">mgmtsystem.nonconformity.form</field>
+ <field name="model">mgmtsystem.nonconformity</field>
+ <field name="inherit_id" ref="mgmtsystem_nonconformity.view_mgmtsystem_nonconformity_form"/>
+ <field name="arch" type="xml">
+
+ <field name="partner_id" position="after">
+ <field name="analytic_account_id" attrs="{'readonly':[('state','not in',['d','a'])]}"/>
+ </field>
+
+ </field>
+ </record>
+
+ </data>
+</openerp>
=== added directory 'mgmtsystem_nonconformity_analytic/static'
=== added directory 'mgmtsystem_nonconformity_analytic/static/src'
=== added directory 'mgmtsystem_nonconformity_analytic/static/src/img'
=== added file 'mgmtsystem_nonconformity_analytic/static/src/img/icon.png'
Binary files mgmtsystem_nonconformity_analytic/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and mgmtsystem_nonconformity_analytic/static/src/img/icon.png 2012-12-12 18:11:29 +0000 differ
=== added directory 'mgmtsystem_nonconformity_claim'
=== added file 'mgmtsystem_nonconformity_claim/__init__.py'
--- mgmtsystem_nonconformity_claim/__init__.py 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_claim/__init__.py 2012-12-12 18:11:29 +0000
@@ -0,0 +1,3 @@
+# -*- encoding: utf-8 -*-
+import mgmtsystem_nonconformity
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'mgmtsystem_nonconformity_claim/__openerp__.py'
--- mgmtsystem_nonconformity_claim/__openerp__.py 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_claim/__openerp__.py 2012-12-12 18:11:29 +0000
@@ -0,0 +1,45 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2012 Daniel Reis
+#
+# 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' : 'Management System - Claims and Nonconformities',
+ 'version' : '0.1',
+ 'author' : 'Daniel Reis',
+ 'category' : 'Management System',
+ 'description': """\
+Extends the Nonconformity form so it can also represent NC candidates and other types of feedback, such as complaints, measurements, suggestions, etc.
+
+The "type" field identifies if the feedback corresponds to a nonconformity, or to other type of record, such as "best practice", "suggestion", etc.
+
+This module purpose overlaps with "mgmtsystem_claim" module, so you should use either one or the other.
+It will fit best to your uses cases requiring:
+ * a common numbering sequence for complaints and nonconformities;
+ * a single point-of-entry for all management system related occurrences.
+""",
+ 'depends' : ['mgmtsystem_nonconformity'],
+ 'data' : [
+ 'security/ir.model.access.csv',
+ 'mgmtsystem_nonconformity.xml',
+ 'mgmtsystem_nonconformity_data.xml',
+ ],
+ 'installable' : True,
+ 'application' : False,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
=== added directory 'mgmtsystem_nonconformity_claim/i18n'
=== added file 'mgmtsystem_nonconformity_claim/i18n/pt.po'
--- mgmtsystem_nonconformity_claim/i18n/pt.po 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_claim/i18n/pt.po 2012-12-12 18:11:29 +0000
@@ -0,0 +1,74 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * mgmtsystem_nonconformity_claim
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1-20120904-232007\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-12-12 10:50+0000\n"
+"PO-Revision-Date: 2012-12-12 10:50+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: mgmtsystem_nonconformity_claim
+#: field:mgmtsystem.nonconformity.type,active:0
+msgid "Active?"
+msgstr "Ativo?"
+
+#. module: mgmtsystem_nonconformity_claim
+#: field:mgmtsystem.nonconformity.type,description:0
+msgid "Description"
+msgstr "Descrição"
+
+#. module: mgmtsystem_nonconformity_claim
+#: field:mgmtsystem.nonconformity.type,name:0
+msgid "Title"
+msgstr "Título"
+
+#. module: mgmtsystem_nonconformity_claim
+#: model:ir.model,name:mgmtsystem_nonconformity_claim.model_mgmtsystem_nonconformity
+msgid "Nonconformity of the management system"
+msgstr "Não conformidade do sistema de gestão"
+
+#. module: mgmtsystem_nonconformity_claim
+#: model:mgmtsystem.nonconformity.type,name:mgmtsystem_nonconformity_claim.nonconformity_type_io
+msgid "Improvement Opportunity"
+msgstr "Oportunidade de melhoria"
+
+#. module: mgmtsystem_nonconformity_claim
+#: model:ir.model,name:mgmtsystem_nonconformity_claim.model_mgmtsystem_nonconformity_type
+msgid "Claim Type"
+msgstr "Tipo de ocorrência"
+
+#. module: mgmtsystem_nonconformity_claim
+#: model:mgmtsystem.nonconformity.type,name:mgmtsystem_nonconformity_claim.nonconformity_type_gp
+msgid "Good Practice"
+msgstr "Boa prática"
+
+#. module: mgmtsystem_nonconformity_claim
+#: model:ir.actions.act_window,name:mgmtsystem_nonconformity_claim.open_mgmtsystem_nonconformity_type_list
+#: model:ir.ui.menu,name:mgmtsystem_nonconformity_claim.menu_open_nonconformity_type
+#: view:mgmtsystem.nonconformity.type:0
+msgid "Claim Types"
+msgstr "Tipos de ocorrência"
+
+#. module: mgmtsystem_nonconformity_claim
+#: view:mgmtsystem.nonconformity:0
+msgid "Claims and Nonconformities"
+msgstr "Ocorrências e não conformidades"
+
+#. module: mgmtsystem_nonconformity_claim
+#: model:mgmtsystem.nonconformity.type,name:mgmtsystem_nonconformity_claim.nonconformity_type_nc
+msgid "Nonconformity"
+msgstr "Não conformidade"
+
+#. module: mgmtsystem_nonconformity_claim
+#: model:mgmtsystem.nonconformity.type,name:mgmtsystem_nonconformity_claim.nonconformity_type_ob
+msgid "Observation"
+msgstr "Observação"
+
=== added file 'mgmtsystem_nonconformity_claim/mgmtsystem_nonconformity.py'
--- mgmtsystem_nonconformity_claim/mgmtsystem_nonconformity.py 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_claim/mgmtsystem_nonconformity.py 2012-12-12 18:11:29 +0000
@@ -0,0 +1,47 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2012 Daniel Reis
+#
+# 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 osv import fields, osv
+
+class mgmtsystem_nonconformity_type(osv.osv):
+ """Claim Type: Nonconformity, Good Practice, Improvement Opportunity, Observation, ..."""
+ _name = "mgmtsystem.nonconformity.type"
+ _description = "Claim Type"
+ _columns = {
+ 'name': fields.char('Title', size=50, required=True, translate=True),
+ 'description': fields.text('Description', translation=True),
+ 'active': fields.boolean('Active?'),
+ }
+ _defaults = {
+ 'active': True,
+ }
+mgmtsystem_nonconformity_type()
+
+
+class mgmtsystem_nonconformity(osv.osv):
+ _name = "mgmtsystem.nonconformity"
+ _inherit = "mgmtsystem.nonconformity"
+ _description = "Feedback and Nonconformities"
+ _columns = {
+ 'type_id': fields.many2one('mgmtsystem.nonconformity.type','Type'),
+ }
+mgmtsystem_nonconformity()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'mgmtsystem_nonconformity_claim/mgmtsystem_nonconformity.xml'
--- mgmtsystem_nonconformity_claim/mgmtsystem_nonconformity.xml 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_claim/mgmtsystem_nonconformity.xml 2012-12-12 18:11:29 +0000
@@ -0,0 +1,68 @@
+<openerp>
+ <data>
+
+ <!-- Feedback Type -->
+ <record id="view_mgmtsystem_nonconformity_type_form" model="ir.ui.view">
+ <field name="name">mgmtsystem.nonconformity.type.form</field>
+ <field name="type">form</field>
+ <field name="model">mgmtsystem.nonconformity.type</field>
+ <field name="arch" type="xml">
+ <form string="Claim Types">
+ <field name="name"/>
+ <field name="active"/>
+ <field name="description" colspan="2"/>
+ </form>
+ </field>
+ </record>
+
+ <record id="open_mgmtsystem_nonconformity_type_list" model="ir.actions.act_window">
+ <field name="name">Claim Types</field>
+ <field name="res_model">mgmtsystem.nonconformity.type</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ </record>
+
+ <menuitem id="menu_open_nonconformity_type"
+ action="open_mgmtsystem_nonconformity_type_list"
+ parent="mgmtsystem_nonconformity.menu_mgmtsystem_configuration_nonconformities"
+ groups="mgmtsystem.group_mgmtsystem_manager"/>
+
+ <!-- Nonconformity FORM -->
+ <record id="view_mgmtsystem_nonconformity_form" model="ir.ui.view">
+ <field name="name">mgmtsystem.nonconformity.form</field>
+ <field name="model">mgmtsystem.nonconformity</field>
+ <field name="inherit_id" ref="mgmtsystem_nonconformity.view_mgmtsystem_nonconformity_form"/>
+ <field name="arch" type="xml">
+
+ <form position="attributes">
+ <attribute name="string">Claims and Nonconformities</attribute>
+ </form>
+
+ <field name="date" position="after">
+ <field name="type_id" attrs="{'readonly':[('state','not in',['d','a'])], 'required':[('state','in',['a','p','o','c'])]}"/>
+ </field>
+
+ </field>
+ </record>
+
+ <!-- Rename NC menu description -->
+ <menuitem id="mgmtsystem_nonconformity.menu_open_nonconformity"
+ name="Claims and Nonconformities"
+ action="mgmtsystem_nonconformity.open_mgmtsystem_nonconformity_list"
+ parent="mgmtsystem.menu_mgmtsystem_main"
+ sequence="20"
+ groups="mgmtsystem.group_mgmtsystem_manager,mgmtsystem.group_mgmtsystem_auditor,base.group_user"
+ />
+
+ <record model="ir.actions.act_window" id="mgmtsystem_nonconformity.open_mgmtsystem_nonconformity_list">
+ <field name="name">Claims and Nonconformities.</field>
+ <field name="res_model">mgmtsystem.nonconformity</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" ref="mgmtsystem_nonconformity.view_mgmtsystem_nonconformity_tree"/>
+ <field name="search_view_id" ref="mgmtsystem_nonconformity.view_mgmtsystem_nonconformity_filter"/>
+ <field name="context">{"search_default_pending":1,"search_default_current":1,"search_default_author_user_id":uid}</field>
+ </record>
+
+ </data>
+</openerp>
=== added file 'mgmtsystem_nonconformity_claim/mgmtsystem_nonconformity_data.xml'
--- mgmtsystem_nonconformity_claim/mgmtsystem_nonconformity_data.xml 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_claim/mgmtsystem_nonconformity_data.xml 2012-12-12 18:11:29 +0000
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data noupdate="1">
+
+ <!-- Feedback Types: Nonconformity, Good Practice, Improvement Opportunity, Observation, ... -->
+ <record id="nonconformity_type_nc" model="mgmtsystem.nonconformity.type">
+ <field name="name">Nonconformity</field>
+ <field name="active" eval="True"/>
+ </record>
+ <record id="nonconformity_type_gp" model="mgmtsystem.nonconformity.type">
+ <field name="name">Good Practice</field>
+ <field name="active" eval="True"/>
+ </record>
+ <record id="nonconformity_type_io" model="mgmtsystem.nonconformity.type">
+ <field name="name">Improvement Opportunity</field>
+ <field name="active" eval="True"/>
+ </record>
+ <record id="nonconformity_type_ob" model="mgmtsystem.nonconformity.type">
+ <field name="name">Observation</field>
+ <field name="active" eval="True"/>
+ </record>
+
+ </data>
+</openerp>
=== added directory 'mgmtsystem_nonconformity_claim/security'
=== added file 'mgmtsystem_nonconformity_claim/security/ir.model.access.csv'
--- mgmtsystem_nonconformity_claim/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_claim/security/ir.model.access.csv 2012-12-12 18:11:29 +0000
@@ -0,0 +1,4 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_mgmtsystem_nonconformity_type_user","mgmtsystem.nonconformity.type.user","model_mgmtsystem_nonconformity_type","mgmtsystem.group_mgmtsystem_user",1,0,0,0
+"access_mgmtsystem_nonconformity_type_viewer","mgmtsystem.nonconformity.type.viewer","model_mgmtsystem_nonconformity_type","mgmtsystem.group_mgmtsystem_viewer",1,0,0,0
+"access_mgmtsystem_nonconformity_type_manager","mgmtsystem.nonconformity.type.manager","model_mgmtsystem_nonconformity_type","mgmtsystem.group_mgmtsystem_manager",1,1,1,1
=== added directory 'mgmtsystem_nonconformity_claim/static'
=== added directory 'mgmtsystem_nonconformity_claim/static/src'
=== added directory 'mgmtsystem_nonconformity_claim/static/src/img'
=== added file 'mgmtsystem_nonconformity_claim/static/src/img/icon.png'
Binary files mgmtsystem_nonconformity_claim/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and mgmtsystem_nonconformity_claim/static/src/img/icon.png 2012-12-12 18:11:29 +0000 differ
=== added directory 'mgmtsystem_nonconformity_deptm'
=== added file 'mgmtsystem_nonconformity_deptm/__init__.py'
--- mgmtsystem_nonconformity_deptm/__init__.py 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_deptm/__init__.py 2012-12-12 18:11:29 +0000
@@ -0,0 +1,3 @@
+# -*- encoding: utf-8 -*-
+import mgmtsystem_nonconformity
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'mgmtsystem_nonconformity_deptm/__openerp__.py'
--- mgmtsystem_nonconformity_deptm/__openerp__.py 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_deptm/__openerp__.py 2012-12-12 18:11:29 +0000
@@ -0,0 +1,32 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2012 Daniel Reis
+#
+# 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" : "Management System Nonconformity - Department",
+ "version" : "0.1",
+ "author" : "Daniel Reis",
+ "category" : "Management System",
+ "description": """Add Department to Non Conformities""",
+ "depends" : ['mgmtsystem_nonconformity', 'hr'],
+ "init" : [],
+ "data" : ['mgmtsystem_nonconformity.xml'],
+ "installable" : True,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
=== added file 'mgmtsystem_nonconformity_deptm/mgmtsystem_nonconformity.py'
--- mgmtsystem_nonconformity_deptm/mgmtsystem_nonconformity.py 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_deptm/mgmtsystem_nonconformity.py 2012-12-12 18:11:29 +0000
@@ -0,0 +1,42 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2012 Daniel Reis
+#
+# 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 osv import fields, osv
+
+class mgmtsystem_nonconformity(osv.osv):
+ _inherit = "mgmtsystem.nonconformity"
+ _columns = {
+ 'department_id': fields.many2one('hr.department', 'Department', required=True),
+ 'superior_user_id': fields.many2one('res.users','Superior', required=True),
+ }
+
+ def onchange_department_id(self, cr, uid, ids, new_id, context=None):
+ result = {}
+ if new_id:
+ deptm = self.pool.get('hr.department').browse(cr, uid, new_id, context=context)
+ if deptm.manager_id and deptm.manager_id.user_id:
+ result['manager_user_id'] = deptm.manager_id.user_id.id
+ if deptm.parent_id and deptm.parent_id.manager_id and deptm.parent_id.manager_id.user_id:
+ result['superior_user_id'] = deptm.parent_id.manager_id.user_id.id
+ return {'value': result}
+
+mgmtsystem_nonconformity()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'mgmtsystem_nonconformity_deptm/mgmtsystem_nonconformity.xml'
--- mgmtsystem_nonconformity_deptm/mgmtsystem_nonconformity.xml 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_deptm/mgmtsystem_nonconformity.xml 2012-12-12 18:11:29 +0000
@@ -0,0 +1,23 @@
+<openerp>
+ <data>
+
+ <record id="view_mgmtsystem_nonconformity_form" model="ir.ui.view">
+ <field name="name">mgmtsystem.nonconformity.form</field>
+ <field name="model">mgmtsystem.nonconformity</field>
+ <field name="inherit_id" ref="mgmtsystem_nonconformity.view_mgmtsystem_nonconformity_form"/>
+ <field name="arch" type="xml">
+
+ <field name="responsible_user_id" position="before">
+ <field name="department_id" attrs="{'readonly':[('state','not in',['d','a'])]}"
+ on_change="onchange_department_id(department_id)" />
+ </field>
+
+ <field name="manager_user_id" position="after">
+ <field name="superior_user_id" attrs="{'readonly':[('state','not in',['d','a'])]}"/>
+ </field>
+
+ </field>
+ </record>
+
+ </data>
+</openerp>
=== added directory 'mgmtsystem_nonconformity_deptm/static'
=== added directory 'mgmtsystem_nonconformity_deptm/static/src'
=== added directory 'mgmtsystem_nonconformity_deptm/static/src/img'
=== added file 'mgmtsystem_nonconformity_deptm/static/src/img/icon.png'
Binary files mgmtsystem_nonconformity_deptm/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and mgmtsystem_nonconformity_deptm/static/src/img/icon.png 2012-12-12 18:11:29 +0000 differ
=== modified file 'mgmtsystem_nonconformity_project/__openerp__.py'
--- mgmtsystem_nonconformity_project/__openerp__.py 2012-03-09 23:47:59 +0000
+++ mgmtsystem_nonconformity_project/__openerp__.py 2012-12-12 18:11:29 +0000
@@ -20,22 +20,21 @@
##############################################################################
{
"name" : "Management System - Project",
- "version" : "0.1",
+ "version" : "0.2",
"author" : "Savoir-faire Linux",
"website" : "http://www.savoirfairelinux.com",
"license" : "GPL-3",
"category" : "Management System",
"description": """
- This module enables you to set a project as an action in the nonconformity.
+This module enables you to set a project as an action in the nonconformity.
""",
- "depends" : ['mgmtsystem_nonconformity','project'],
- "init_xml" : [],
+ "depends" : ['mgmtsystem_nonconformity','mgmtsystem_action','project'],
"update_xml" : [
- 'mgmtsystem_nonconformity_project.xml',
+ 'mgmtsystem_nonconformity_project.xml',
+ 'mgmtsystem_nonconformity_project_data.xml',
],
"demo_xml" : [],
"installable" : True,
- "certificate" : ''
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'mgmtsystem_nonconformity_project/mgmtsystem_nonconformity_project.py'
--- mgmtsystem_nonconformity_project/mgmtsystem_nonconformity_project.py 2012-03-09 23:47:59 +0000
+++ mgmtsystem_nonconformity_project/mgmtsystem_nonconformity_project.py 2012-12-12 18:11:29 +0000
@@ -20,17 +20,44 @@
##############################################################################
from osv import fields, osv
-from project.project import project
-
-class mgmtsystem_nonconformity_project(osv.osv):
- _inherit = "mgmtsystem.nonconformity"
+
+class mgmtsystem_action(osv.osv):
+ _inherit = "mgmtsystem.action"
+
+ def _complete_name(self, cr, uid, ids, name, args, context=None):
+ res = dict()
+ for t in self.name_get(cr, uid, ids, context=context):
+ res[t[0]] = t[1]
+ return res
+
_columns = {
- 'corrective_type': fields.selection((('task','Task'), ('project','Project')),'Corrective Action Type'),
- 'corrective_project_id': fields.many2one('project.project', 'Corrective Project'),
- 'preventive_type': fields.selection((('task','Task'), ('project','Project')),'Preventive Action Type'),
- 'preventive_project_id': fields.many2one('project.project', 'Preventive Project'),
- }
+ 'action_type': fields.selection([('a','Action'), ('p','Project')]
+ , 'Action Type', required=True),
+ 'project_id': fields.many2one('project.project', 'Project'),
+ 'complete_name': fields.function(_complete_name, string='Complete Name', type='char', size=250),
+ 'name': fields.char('Claim Subject', size=128, required=False), #modified: it's not always required
+ }
+ _defaults = {
+ 'action_type': 'a',
+ }
+
+ def name_get(self, cr, uid, ids, context=None):
+ if not ids:
+ return list()
+ res = list()
+ project_model = self.pool.get('project.project')
+ for o in self.browse(cr, uid, ids, context=context):
+ r = (o.id, o.name)
+ if o.action_type == 'p' and o.project_id:
+ r = (o.id, o.project_id.name)
+ res.append(r)
+ return res
+
+ def _init_install(self, cr, uid):
+ """Initialize current data in inherited modules."""
+ cr.execute("update mgmtsystem_action set action_type='a' where action_type is null")
+ return True
-mgmtsystem_nonconformity_project()
+mgmtsystem_action()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'mgmtsystem_nonconformity_project/mgmtsystem_nonconformity_project.xml'
--- mgmtsystem_nonconformity_project/mgmtsystem_nonconformity_project.xml 2012-03-09 23:47:59 +0000
+++ mgmtsystem_nonconformity_project/mgmtsystem_nonconformity_project.xml 2012-12-12 18:11:29 +0000
@@ -1,31 +1,37 @@
<openerp>
<data>
- <record id="view_mgmtsystem_nonconformity_form" model="ir.ui.view">
- <field name="name">mgmtsystem.nonconformity.inherit</field>
- <field name="model">mgmtsystem.nonconformity</field>
- <field name="inherit_id" ref="mgmtsystem_nonconformity.view_mgmtsystem_nonconformity_form"/>
- <field name="arch" type="xml">
- <field name="corrective_action_id" position="replace">
- <newline/>
- <field name="corrective_type"/>
- <group attrs="{'invisible' : [('corrective_type', '!=', 'task')]}">
- <field name="corrective_action_id" nolabel="1"/>
- </group>
- <group attrs="{'invisible' : [('corrective_type', '!=', 'project')]}">
- <field name="corrective_project_id" nolabel="1"/>
- </group>
- </field>
- <field name="preventive_action_id" position="replace">
- <newline/>
- <field name="preventive_type"/>
- <group attrs="{'invisible' : [('preventive_type', '!=', 'task')]}">
- <field name="preventive_action_id" nolabel="1"/>
- </group>
- <group attrs="{'invisible' : [('preventive_type', '!=', 'project')]}">
- <field name="preventive_project_id" nolabel="1"/>
- </group>
- </field>
+ <record id="view_mgmtsystem_action_tree" model="ir.ui.view">
+ <field name="name">mgmtsystem.action.tree</field>
+ <field name="model">mgmtsystem.action</field>
+ <field name="inherit_id" ref="mgmtsystem_action.view_mgmtsystem_action_tree"/>
+ <field name="arch" type="xml">
+
+ <field name="name" position="replace">
+ <field name="action_type"/>
+ <field name="complete_name"/>
+ </field>
+
+ </field>
+ </record>
+
+ <record id="view_mgmtsystem_action_form" model="ir.ui.view">
+ <field name="name">mgmtsystem.action.form</field>
+ <field name="model">mgmtsystem.action</field>
+ <field name="inherit_id" ref="mgmtsystem_action.view_mgmtsystem_action_form"/>
+ <field name="arch" type="xml">
+
+ <field name="name" position="replace">
+ <field name="action_type"/>
+ </field>
+
+ <field name="type_action" position="after">
+ <field name="name" colspan="4"
+ attrs="{'invisible' : [('action_type', '!=', 'a')]}"/>
+ <field name="project_id" colspan="4"
+ attrs="{'invisible' : [('action_type', '!=', 'p')]}"/>
+ </field>
+
</field>
</record>
=== added file 'mgmtsystem_nonconformity_project/mgmtsystem_nonconformity_project_data.xml'
--- mgmtsystem_nonconformity_project/mgmtsystem_nonconformity_project_data.xml 1970-01-01 00:00:00 +0000
+++ mgmtsystem_nonconformity_project/mgmtsystem_nonconformity_project_data.xml 2012-12-12 18:11:29 +0000
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<openerp>
+<data noupdate="1">
+
+ <!-- Initialize existing data -->
+ <function model="mgmtsystem.action" name="_init_install"/>
+
+</data>
+</openerp>
+
=== modified file 'mgmtsystem_quality/__openerp__.py'
--- mgmtsystem_quality/__openerp__.py 2012-04-18 18:32:23 +0000
+++ mgmtsystem_quality/__openerp__.py 2012-12-12 18:11:29 +0000
@@ -25,15 +25,15 @@
"website" : "http://www.savoirfairelinux.com",
"license" : "GPL-3",
"category" : "Management System",
- "description": """
- This module enables you to manage your quality management system, including :
- * Quality Manual
- * Reviews
- * Audits
- * Procedures
- * Nonconformities
- * Actions
- * Employee Training
+ "description": """\
+This module enables you to manage your quality management system, including :
+ * Quality Manual
+ * Reviews
+ * Audits
+ * Procedures
+ * Nonconformities
+ * Actions
+ * Employee Training
""",
"depends" : [
'mgmtsystem_audit',
@@ -46,6 +46,7 @@
"update_xml" : ['quality.xml'],
"demo_xml" : [],
"installable" : True,
+ "application" : True,
"certificate" : ''
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'mgmtsystem_review/__openerp__.py'
--- mgmtsystem_review/__openerp__.py 2012-09-09 14:18:43 +0000
+++ mgmtsystem_review/__openerp__.py 2012-12-12 18:11:29 +0000
@@ -25,9 +25,8 @@
"website" : "http://www.savoirfairelinux.com",
"license" : "GPL-3",
"category" : "Management System",
- "description": """
- This module enables you to manage reviews of
- your management system.
+ "description": """\
+This module enables you to manage reviews of your management system.
""",
"depends" : [
'mgmtsystem_nonconformity',
@@ -35,12 +34,12 @@
'audittrail',
],
"init_xml" : [
- 'review_sequence.xml',
+ 'review_sequence.xml',
],
"update_xml" : [
'security/ir.model.access.csv',
- 'mgmtsystem_review.xml',
- 'report/review_report.xml',
+ 'mgmtsystem_review.xml',
+ 'report/review_report.xml',
],
"demo_xml" : [],
"installable" : True,
Follow ups