Merge lp:~openerp-community/openerp-mgmtsystem/7-0-fix-1137634 into lp:openerp-mgmtsystem
- 7-0-fix-1137634
- Merge into 7.0
Status: | Merged |
---|---|
Merged at revision: | 28 |
Proposed branch: | lp:~openerp-community/openerp-mgmtsystem/7-0-fix-1137634 |
Merge into: | lp:openerp-mgmtsystem |
Diff against target: |
557 lines (+216/-219) 15 files modified
mgmtsystem_action/__openerp__.py (+4/-6) mgmtsystem_audit/mgmtsystem_audit.py (+1/-2) mgmtsystem_audit/mgmtsystem_audit.xml (+2/-2) mgmtsystem_audit/migrations/6.1.1.0/openupgrade_analysis.txt (+0/-7) mgmtsystem_audit/migrations/6.1.1.0/post-migration.py (+0/-35) mgmtsystem_audit/migrations/7.0.1.0/openupgrade_analysis.txt (+7/-0) mgmtsystem_audit/migrations/7.0.1.0/post-migration.py (+35/-0) mgmtsystem_nonconformity/migrations/6.1.1.0/openupgrade_analysis.txt (+0/-78) mgmtsystem_nonconformity/migrations/6.1.1.0/post-migration.py (+0/-52) mgmtsystem_nonconformity/migrations/7.0.1.0/openupgrade_analysis.txt (+78/-0) mgmtsystem_nonconformity/migrations/7.0.1.0/post-migration.py (+52/-0) mgmtsystem_review/migrations/6.1.1.0/openupgrade_analysis.txt (+0/-2) mgmtsystem_review/migrations/6.1.1.0/post-migration.py (+0/-35) mgmtsystem_review/migrations/7.0.1.0/openupgrade_analysis.txt (+2/-0) mgmtsystem_review/migrations/7.0.1.0/post-migration.py (+35/-0) |
To merge this branch: | bzr merge lp:~openerp-community/openerp-mgmtsystem/7-0-fix-1137634 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Joao Alfredo Gama Batista | Approve | ||
Review via email: mp+156401@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'mgmtsystem_action/__openerp__.py' |
2 | --- mgmtsystem_action/__openerp__.py 2013-03-01 10:41:55 +0000 |
3 | +++ mgmtsystem_action/__openerp__.py 2013-04-01 19:50:28 +0000 |
4 | @@ -20,29 +20,27 @@ |
5 | ############################################################################## |
6 | { |
7 | "name" : "Management System - Action", |
8 | - "version" : "1.0", |
9 | + "version" : "1.1", |
10 | "author" : "Savoir-faire Linux", |
11 | "website" : "http://www.savoirfairelinux.com", |
12 | "license" : "AGPL-3", |
13 | "category" : "Management System", |
14 | "description": """\ |
15 | -This module enables you to manage the different actions of your management system : |
16 | +This module enables you to manage the different actions of your management system: |
17 | * immediate actions |
18 | * corrective actions |
19 | * preventive actions |
20 | * improvement opportunities. |
21 | """, |
22 | "depends": ['mgmtsystem', 'crm_claim'], |
23 | - "init": [ |
24 | + "data": [ |
25 | 'action_sequence.xml', |
26 | 'workflow_mgmtsystem_action.xml', |
27 | - ], |
28 | - "data": [ |
29 | 'security/ir.model.access.csv', |
30 | 'mgmtsystem_action.xml', |
31 | 'board_mgmtsystem_action.xml', |
32 | ], |
33 | - "demo_xml" : ['demo_action.xml',], |
34 | + "demo" : ['demo_action.xml',], |
35 | "installable" : True, |
36 | } |
37 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
38 | |
39 | === modified file 'mgmtsystem_audit/mgmtsystem_audit.py' |
40 | --- mgmtsystem_audit/mgmtsystem_audit.py 2013-03-04 14:34:30 +0000 |
41 | +++ mgmtsystem_audit/mgmtsystem_audit.py 2013-04-01 19:50:28 +0000 |
42 | @@ -35,8 +35,7 @@ |
43 | 'strong_points': fields.text('Strong Points'), |
44 | 'to_improve_points': fields.text('Points To Improve'), |
45 | 'imp_opp_ids': fields.many2many('mgmtsystem.action','mgmtsystem_audit_imp_opp_rel','mgmtsystem_action_id','mgmtsystem_audit_id','Improvement Opportunities'), |
46 | - 'nonconformity_ids': fields.many2many( |
47 | - 'mgmtsystem.nonconformity', string='Nonconformities'), |
48 | + 'nonconformity_ids': fields.many2many('mgmtsystem.nonconformity', string='Nonconformities'), |
49 | 'state': fields.selection([('open','Open'),('done','Closed')], 'State'), |
50 | 'system_id': fields.many2one('mgmtsystem.system', 'System'), |
51 | } |
52 | |
53 | === modified file 'mgmtsystem_audit/mgmtsystem_audit.xml' |
54 | --- mgmtsystem_audit/mgmtsystem_audit.xml 2013-03-04 11:31:40 +0000 |
55 | +++ mgmtsystem_audit/mgmtsystem_audit.xml 2013-04-01 19:50:28 +0000 |
56 | @@ -27,7 +27,7 @@ |
57 | <group> |
58 | <field name="seq"/> |
59 | <field name="name"/> |
60 | - <field name="procedure_id" domain="[('group_id','=','Procedure')]"/> |
61 | + <field name="procedure_id" domain="[('parent_id','in',['Procedure', 'Environmental Aspect', 'Quality Manual', 'Environment Manual'])]"/> |
62 | <field name="is_conformed"/> |
63 | <field name="comments"/> |
64 | </group> |
65 | @@ -45,7 +45,7 @@ |
66 | <field name="name"/> |
67 | <field name="is_conformed"/> |
68 | <newline/> |
69 | - <field name="procedure_id" domain="[('group_id','=','Procedure')]"/> |
70 | + <field name="procedure_id" domain="[('parent_id','in',['Procedure', 'Environmental Aspect', 'Quality Manual', 'Environment Manual'])]"/> |
71 | <field name="seq"/> |
72 | <newline/> |
73 | <field name="comments"/> |
74 | |
75 | === removed directory 'mgmtsystem_audit/migrations/6.1.1.0' |
76 | === removed file 'mgmtsystem_audit/migrations/6.1.1.0/openupgrade_analysis.txt' |
77 | --- mgmtsystem_audit/migrations/6.1.1.0/openupgrade_analysis.txt 2012-12-19 19:36:39 +0000 |
78 | +++ mgmtsystem_audit/migrations/6.1.1.0/openupgrade_analysis.txt 1970-01-01 00:00:00 +0000 |
79 | @@ -1,7 +0,0 @@ |
80 | ----mgmtsystem_audit--- |
81 | -mgmtsystem_audit / mgmtsystem.audit / state (selection) : selection_keys is now '['done', 'open']' ('['c', 'o']') |
82 | -mgmtsystem_audit / mgmtsystem.nonconformity / audit_ids (many2many) : NEW relation: mgmtsystem.audit |
83 | -new xml-id of model ir.model.access: mgmtsystem_audit.access_mgmtsystem_audit_viewer |
84 | -new xml-id of model ir.model.access: mgmtsystem_audit.access_mgmtsystem_verification_line_manager |
85 | -new xml-id of model ir.model.access: mgmtsystem_audit.access_mgmtsystem_verification_line_viewer |
86 | -new xml-id of model ir.ui.view: mgmtsystem_audit.view_mgmtsystem_nonconformity_form |
87 | |
88 | === removed file 'mgmtsystem_audit/migrations/6.1.1.0/post-migration.py' |
89 | --- mgmtsystem_audit/migrations/6.1.1.0/post-migration.py 2013-01-25 13:56:44 +0000 |
90 | +++ mgmtsystem_audit/migrations/6.1.1.0/post-migration.py 1970-01-01 00:00:00 +0000 |
91 | @@ -1,35 +0,0 @@ |
92 | -# -*- coding: utf-8 -*- |
93 | -############################################################################## |
94 | -# |
95 | -# OpenERP, Open Source Management Solution |
96 | -# This module copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). |
97 | -# |
98 | -# This program is free software: you can redistribute it and/or modify |
99 | -# it under the terms of the GNU Affero General Public License as |
100 | -# published by the Free Software Foundation, either version 3 of the |
101 | -# License, or (at your option) any later version. |
102 | -# |
103 | -# This program is distributed in the hope that it will be useful, |
104 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
105 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
106 | -# GNU Affero General Public License for more details. |
107 | -# |
108 | -# You should have received a copy of the GNU Affero General Public License |
109 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
110 | -# |
111 | -############################################################################## |
112 | - |
113 | -import os |
114 | -from osv import osv |
115 | -import logging |
116 | - |
117 | -logger = logging.getLogger('upgrade') |
118 | - |
119 | -def migrate(cr, version): |
120 | - logger.info("Migrating mgmtsystem_audit from version %s", version) |
121 | - |
122 | - logger.info("Updating state flags") |
123 | - cr.execute("update mgmtsystem_audit set state = 'open' where state = 'o'") |
124 | - cr.execute("update mgmtsystem_audit set state = 'done' where state = 'c'") |
125 | - |
126 | - logger.info("mgmtsystem_audit update... done!") |
127 | |
128 | === added directory 'mgmtsystem_audit/migrations/7.0.1.0' |
129 | === added file 'mgmtsystem_audit/migrations/7.0.1.0/openupgrade_analysis.txt' |
130 | --- mgmtsystem_audit/migrations/7.0.1.0/openupgrade_analysis.txt 1970-01-01 00:00:00 +0000 |
131 | +++ mgmtsystem_audit/migrations/7.0.1.0/openupgrade_analysis.txt 2013-04-01 19:50:28 +0000 |
132 | @@ -0,0 +1,7 @@ |
133 | +---mgmtsystem_audit--- |
134 | +mgmtsystem_audit / mgmtsystem.audit / state (selection) : selection_keys is now '['done', 'open']' ('['c', 'o']') |
135 | +mgmtsystem_audit / mgmtsystem.nonconformity / audit_ids (many2many) : NEW relation: mgmtsystem.audit |
136 | +new xml-id of model ir.model.access: mgmtsystem_audit.access_mgmtsystem_audit_viewer |
137 | +new xml-id of model ir.model.access: mgmtsystem_audit.access_mgmtsystem_verification_line_manager |
138 | +new xml-id of model ir.model.access: mgmtsystem_audit.access_mgmtsystem_verification_line_viewer |
139 | +new xml-id of model ir.ui.view: mgmtsystem_audit.view_mgmtsystem_nonconformity_form |
140 | |
141 | === added file 'mgmtsystem_audit/migrations/7.0.1.0/post-migration.py' |
142 | --- mgmtsystem_audit/migrations/7.0.1.0/post-migration.py 1970-01-01 00:00:00 +0000 |
143 | +++ mgmtsystem_audit/migrations/7.0.1.0/post-migration.py 2013-04-01 19:50:28 +0000 |
144 | @@ -0,0 +1,35 @@ |
145 | +# -*- coding: utf-8 -*- |
146 | +############################################################################## |
147 | +# |
148 | +# OpenERP, Open Source Management Solution |
149 | +# This module copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). |
150 | +# |
151 | +# This program is free software: you can redistribute it and/or modify |
152 | +# it under the terms of the GNU Affero General Public License as |
153 | +# published by the Free Software Foundation, either version 3 of the |
154 | +# License, or (at your option) any later version. |
155 | +# |
156 | +# This program is distributed in the hope that it will be useful, |
157 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
158 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
159 | +# GNU Affero General Public License for more details. |
160 | +# |
161 | +# You should have received a copy of the GNU Affero General Public License |
162 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
163 | +# |
164 | +############################################################################## |
165 | + |
166 | +import os |
167 | +from osv import osv |
168 | +import logging |
169 | + |
170 | +logger = logging.getLogger('upgrade') |
171 | + |
172 | +def migrate(cr, version): |
173 | + logger.info("Migrating mgmtsystem_audit from version %s", version) |
174 | + |
175 | + logger.info("Updating state flags") |
176 | + cr.execute("update mgmtsystem_audit set state = 'open' where state = 'o'") |
177 | + cr.execute("update mgmtsystem_audit set state = 'done' where state = 'c'") |
178 | + |
179 | + logger.info("mgmtsystem_audit update... done!") |
180 | |
181 | === removed directory 'mgmtsystem_nonconformity/migrations/6.1.1.0' |
182 | === removed file 'mgmtsystem_nonconformity/migrations/6.1.1.0/openupgrade_analysis.txt' |
183 | --- mgmtsystem_nonconformity/migrations/6.1.1.0/openupgrade_analysis.txt 2012-12-19 19:36:39 +0000 |
184 | +++ mgmtsystem_nonconformity/migrations/6.1.1.0/openupgrade_analysis.txt 1970-01-01 00:00:00 +0000 |
185 | @@ -1,78 +0,0 @@ |
186 | ----mgmtsystem_nonconformity--- |
187 | -mgmtsystem_nonconformity / mgmtsystem.action / nonconformity_ids (many2many) : NEW relation: mgmtsystem.nonconformity |
188 | -mgmtsystem_nonconformity / mgmtsystem.action / nonconformity_immediate_id (one2many): NEW relation: mgmtsystem.nonconformity |
189 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / action_comments (text) : NEW |
190 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / action_ids (many2many) : NEW relation: mgmtsystem.action |
191 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / actions_date (datetime) : NEW |
192 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / actions_user_id (many2one) : NEW relation: res.users |
193 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / analysis_date (datetime) : NEW |
194 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / analysis_user_id (many2one) : NEW relation: res.users |
195 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / corrective_action_id (many2one): DEL relation: mgmtsystem.action |
196 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / effectiveness_corrective (text): DEL |
197 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / effectiveness_immediate (text): DEL |
198 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / effectiveness_preventive (text): DEL |
199 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / evaluation_comments (text) : NEW |
200 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / evaluation_date (datetime) : NEW |
201 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / evaluation_user_id (many2one) : NEW relation: res.users |
202 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / message_ids (one2many) : NEW relation: mail.message |
203 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / preventive_action_id (many2one): DEL relation: mgmtsystem.action |
204 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / severity_id (many2one) : NEW relation: mgmtsystem.nonconformity.severity |
205 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity / state (selection) : selection_keys is now '['analysis', 'cancel', 'done', 'draft', 'open', 'pending']' ('['c', 'o']') |
206 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / child_ids (one2many) : NEW relation: mgmtsystem.nonconformity.cause |
207 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / parent_id (many2one) : NEW relation: mgmtsystem.nonconformity.cause |
208 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / ref_code (char) : NEW |
209 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / sequence (integer) : NEW |
210 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / child_ids (one2many) : NEW relation: mgmtsystem.nonconformity.origin |
211 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / parent_id (many2one) : NEW relation: mgmtsystem.nonconformity.origin |
212 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / ref_code (char) : NEW |
213 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / sequence (integer) : NEW |
214 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / active (boolean) : NEW |
215 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / description (text) : NEW |
216 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / name (char) : NEW required: required |
217 | -mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / sequence (integer) : NEW |
218 | -new xml-id of model ir.actions.act_window: mgmtsystem_nonconformity.open_mgmtsystem_nonconformity_severity_list |
219 | -new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_cause_viewer |
220 | -new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_origin_viewer |
221 | -new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_severity_manager |
222 | -new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_severity_user |
223 | -new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_severity_viewer |
224 | -new xml-id of model ir.ui.menu: mgmtsystem_nonconformity.menu_open_nonconformity_severity |
225 | -new xml-id of model ir.ui.view: mgmtsystem_nonconformity.view_mgmtsystem_action_form |
226 | -new xml-id of model ir.ui.view: mgmtsystem_nonconformity.view_mgmtsystem_nonconformity_severity_form |
227 | -new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.bad_communication |
228 | -new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.bad_partner_relation |
229 | -new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.badly_defined_need |
230 | -new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.hr_unavailable_inadequate |
231 | -new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.information_not_available |
232 | -new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.instruction_not_respected |
233 | -new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.procedure_not_defined |
234 | -new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.procedure_not_respected |
235 | -new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.technical_failure |
236 | -new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.work_conditions |
237 | -new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_dr |
238 | -new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_extenal_audit |
239 | -new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_external_client |
240 | -new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_internal_audit |
241 | -new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_internal_client |
242 | -new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_process |
243 | -new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_qc |
244 | -new xml-id of model mgmtsystem.nonconformity.severity: mgmtsystem_nonconformity.nonconformity_severity_maj |
245 | -new xml-id of model mgmtsystem.nonconformity.severity: mgmtsystem_nonconformity.nonconformity_severity_min |
246 | -new xml-id of model mgmtsystem.nonconformity.severity: mgmtsystem_nonconformity.nonconformity_severity_no |
247 | -new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_analysis |
248 | -new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_cancel |
249 | -new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_close |
250 | -new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_draft |
251 | -new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open |
252 | -new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending |
253 | -new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_analysis_cancel |
254 | -new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_analysis_pending |
255 | -new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_draft_analysis |
256 | -new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_draft_cancel |
257 | -new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open_cancel |
258 | -new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open_close |
259 | -new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open_pending |
260 | -new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending_analysis |
261 | -new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending_cancel |
262 | -new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending_open |
263 | -new xml-id of model workflow: mgmtsystem_nonconformity.mgmtsystem_nonconformity_workflow |
264 | |
265 | === removed file 'mgmtsystem_nonconformity/migrations/6.1.1.0/post-migration.py' |
266 | --- mgmtsystem_nonconformity/migrations/6.1.1.0/post-migration.py 2013-01-25 14:10:00 +0000 |
267 | +++ mgmtsystem_nonconformity/migrations/6.1.1.0/post-migration.py 1970-01-01 00:00:00 +0000 |
268 | @@ -1,52 +0,0 @@ |
269 | -# -*- coding: utf-8 -*- |
270 | -############################################################################## |
271 | -# |
272 | -# OpenERP, Open Source Management Solution |
273 | -# This module copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). |
274 | -# |
275 | -# This program is free software: you can redistribute it and/or modify |
276 | -# it under the terms of the GNU Affero General Public License as |
277 | -# published by the Free Software Foundation, either version 3 of the |
278 | -# License, or (at your option) any later version. |
279 | -# |
280 | -# This program is distributed in the hope that it will be useful, |
281 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
282 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
283 | -# GNU Affero General Public License for more details. |
284 | -# |
285 | -# You should have received a copy of the GNU Affero General Public License |
286 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
287 | -# |
288 | -############################################################################## |
289 | - |
290 | -import os |
291 | -from osv import osv |
292 | -import logging |
293 | - |
294 | -logger = logging.getLogger('upgrade') |
295 | - |
296 | -def migrate(cr, version): |
297 | - logger.info("Migrating mgmtsystem_nonconformity from version %s", version) |
298 | - cr.execute("select count(*) from mgmtsystem_nonconformity_action_rel") |
299 | - rowcount = cr.fetchone()[0] |
300 | - if rowcount == 0: |
301 | - logger.info("Moving nonconformity/action relations to mgmtsystem_nonconformity_action_rel") |
302 | - for action_field in ('preventive_action_id', 'immediate_action_id', 'corrective_action_id'): |
303 | - cr.execute("insert into mgmtsystem_nonconformity_action_rel" |
304 | - "(nonconformity_id, action_id) " |
305 | - "(SELECT id, %s FROM " |
306 | - " mgmtsystem_nonconformity " |
307 | - "WHERE %s IS NOT NULL )" % (action_field, action_field)) |
308 | - else: |
309 | - logger.warning("Attempt to migrate nonconformity action IDs failed: migration was already done.") |
310 | - |
311 | - logger.info("Concatening action comments into evaluation_comments") |
312 | - cr.execute("update mgmtsystem_nonconformity set evaluation_comments = " |
313 | - "effectiveness_preventive || ' ' || effectiveness_immediate || ' ' || effectiveness_corrective " |
314 | - "where evaluation_comments is null") |
315 | - |
316 | - logger.info("Updating state flags") |
317 | - cr.execute("update mgmtsystem_nonconformity set state = 'open' where state = 'o'") |
318 | - cr.execute("update mgmtsystem_nonconformity set state = 'done' where state = 'c'") |
319 | - |
320 | - logger.info("mgmtsystem_nonconformity update... done!") |
321 | |
322 | === added directory 'mgmtsystem_nonconformity/migrations/7.0.1.0' |
323 | === added file 'mgmtsystem_nonconformity/migrations/7.0.1.0/openupgrade_analysis.txt' |
324 | --- mgmtsystem_nonconformity/migrations/7.0.1.0/openupgrade_analysis.txt 1970-01-01 00:00:00 +0000 |
325 | +++ mgmtsystem_nonconformity/migrations/7.0.1.0/openupgrade_analysis.txt 2013-04-01 19:50:28 +0000 |
326 | @@ -0,0 +1,78 @@ |
327 | +---mgmtsystem_nonconformity--- |
328 | +mgmtsystem_nonconformity / mgmtsystem.action / nonconformity_ids (many2many) : NEW relation: mgmtsystem.nonconformity |
329 | +mgmtsystem_nonconformity / mgmtsystem.action / nonconformity_immediate_id (one2many): NEW relation: mgmtsystem.nonconformity |
330 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / action_comments (text) : NEW |
331 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / action_ids (many2many) : NEW relation: mgmtsystem.action |
332 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / actions_date (datetime) : NEW |
333 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / actions_user_id (many2one) : NEW relation: res.users |
334 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / analysis_date (datetime) : NEW |
335 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / analysis_user_id (many2one) : NEW relation: res.users |
336 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / corrective_action_id (many2one): DEL relation: mgmtsystem.action |
337 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / effectiveness_corrective (text): DEL |
338 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / effectiveness_immediate (text): DEL |
339 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / effectiveness_preventive (text): DEL |
340 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / evaluation_comments (text) : NEW |
341 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / evaluation_date (datetime) : NEW |
342 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / evaluation_user_id (many2one) : NEW relation: res.users |
343 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / message_ids (one2many) : NEW relation: mail.message |
344 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / preventive_action_id (many2one): DEL relation: mgmtsystem.action |
345 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / severity_id (many2one) : NEW relation: mgmtsystem.nonconformity.severity |
346 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity / state (selection) : selection_keys is now '['analysis', 'cancel', 'done', 'draft', 'open', 'pending']' ('['c', 'o']') |
347 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / child_ids (one2many) : NEW relation: mgmtsystem.nonconformity.cause |
348 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / parent_id (many2one) : NEW relation: mgmtsystem.nonconformity.cause |
349 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / ref_code (char) : NEW |
350 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity.cause / sequence (integer) : NEW |
351 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / child_ids (one2many) : NEW relation: mgmtsystem.nonconformity.origin |
352 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / parent_id (many2one) : NEW relation: mgmtsystem.nonconformity.origin |
353 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / ref_code (char) : NEW |
354 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity.origin / sequence (integer) : NEW |
355 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / active (boolean) : NEW |
356 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / description (text) : NEW |
357 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / name (char) : NEW required: required |
358 | +mgmtsystem_nonconformity / mgmtsystem.nonconformity.severity / sequence (integer) : NEW |
359 | +new xml-id of model ir.actions.act_window: mgmtsystem_nonconformity.open_mgmtsystem_nonconformity_severity_list |
360 | +new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_cause_viewer |
361 | +new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_origin_viewer |
362 | +new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_severity_manager |
363 | +new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_severity_user |
364 | +new xml-id of model ir.model.access: mgmtsystem_nonconformity.access_mgmtsystem_nonconformity_severity_viewer |
365 | +new xml-id of model ir.ui.menu: mgmtsystem_nonconformity.menu_open_nonconformity_severity |
366 | +new xml-id of model ir.ui.view: mgmtsystem_nonconformity.view_mgmtsystem_action_form |
367 | +new xml-id of model ir.ui.view: mgmtsystem_nonconformity.view_mgmtsystem_nonconformity_severity_form |
368 | +new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.bad_communication |
369 | +new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.bad_partner_relation |
370 | +new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.badly_defined_need |
371 | +new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.hr_unavailable_inadequate |
372 | +new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.information_not_available |
373 | +new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.instruction_not_respected |
374 | +new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.procedure_not_defined |
375 | +new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.procedure_not_respected |
376 | +new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.technical_failure |
377 | +new xml-id of model mgmtsystem.nonconformity.cause: mgmtsystem_nonconformity.work_conditions |
378 | +new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_dr |
379 | +new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_extenal_audit |
380 | +new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_external_client |
381 | +new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_internal_audit |
382 | +new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_internal_client |
383 | +new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_process |
384 | +new xml-id of model mgmtsystem.nonconformity.origin: mgmtsystem_nonconformity.nc_origin_qc |
385 | +new xml-id of model mgmtsystem.nonconformity.severity: mgmtsystem_nonconformity.nonconformity_severity_maj |
386 | +new xml-id of model mgmtsystem.nonconformity.severity: mgmtsystem_nonconformity.nonconformity_severity_min |
387 | +new xml-id of model mgmtsystem.nonconformity.severity: mgmtsystem_nonconformity.nonconformity_severity_no |
388 | +new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_analysis |
389 | +new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_cancel |
390 | +new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_close |
391 | +new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_draft |
392 | +new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open |
393 | +new xml-id of model workflow.activity: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending |
394 | +new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_analysis_cancel |
395 | +new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_analysis_pending |
396 | +new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_draft_analysis |
397 | +new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_draft_cancel |
398 | +new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open_cancel |
399 | +new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open_close |
400 | +new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_open_pending |
401 | +new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending_analysis |
402 | +new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending_cancel |
403 | +new xml-id of model workflow.transition: mgmtsystem_nonconformity.mgmtsystem_nonconformity_pending_open |
404 | +new xml-id of model workflow: mgmtsystem_nonconformity.mgmtsystem_nonconformity_workflow |
405 | |
406 | === added file 'mgmtsystem_nonconformity/migrations/7.0.1.0/post-migration.py' |
407 | --- mgmtsystem_nonconformity/migrations/7.0.1.0/post-migration.py 1970-01-01 00:00:00 +0000 |
408 | +++ mgmtsystem_nonconformity/migrations/7.0.1.0/post-migration.py 2013-04-01 19:50:28 +0000 |
409 | @@ -0,0 +1,52 @@ |
410 | +# -*- coding: utf-8 -*- |
411 | +############################################################################## |
412 | +# |
413 | +# OpenERP, Open Source Management Solution |
414 | +# This module copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). |
415 | +# |
416 | +# This program is free software: you can redistribute it and/or modify |
417 | +# it under the terms of the GNU Affero General Public License as |
418 | +# published by the Free Software Foundation, either version 3 of the |
419 | +# License, or (at your option) any later version. |
420 | +# |
421 | +# This program is distributed in the hope that it will be useful, |
422 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
423 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
424 | +# GNU Affero General Public License for more details. |
425 | +# |
426 | +# You should have received a copy of the GNU Affero General Public License |
427 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
428 | +# |
429 | +############################################################################## |
430 | + |
431 | +import os |
432 | +from osv import osv |
433 | +import logging |
434 | + |
435 | +logger = logging.getLogger('upgrade') |
436 | + |
437 | +def migrate(cr, version): |
438 | + logger.info("Migrating mgmtsystem_nonconformity from version %s", version) |
439 | + cr.execute("select count(*) from mgmtsystem_nonconformity_action_rel") |
440 | + rowcount = cr.fetchone()[0] |
441 | + if rowcount == 0: |
442 | + logger.info("Moving nonconformity/action relations to mgmtsystem_nonconformity_action_rel") |
443 | + for action_field in ('preventive_action_id', 'immediate_action_id', 'corrective_action_id'): |
444 | + cr.execute("insert into mgmtsystem_nonconformity_action_rel" |
445 | + "(nonconformity_id, action_id) " |
446 | + "(SELECT id, %s FROM " |
447 | + " mgmtsystem_nonconformity " |
448 | + "WHERE %s IS NOT NULL )" % (action_field, action_field)) |
449 | + else: |
450 | + logger.warning("Attempt to migrate nonconformity action IDs failed: migration was already done.") |
451 | + |
452 | + logger.info("Concatening action comments into evaluation_comments") |
453 | + cr.execute("update mgmtsystem_nonconformity set evaluation_comments = " |
454 | + "effectiveness_preventive || ' ' || effectiveness_immediate || ' ' || effectiveness_corrective " |
455 | + "where evaluation_comments is null") |
456 | + |
457 | + logger.info("Updating state flags") |
458 | + cr.execute("update mgmtsystem_nonconformity set state = 'open' where state = 'o'") |
459 | + cr.execute("update mgmtsystem_nonconformity set state = 'done' where state = 'c'") |
460 | + |
461 | + logger.info("mgmtsystem_nonconformity update... done!") |
462 | |
463 | === removed directory 'mgmtsystem_review/migrations/6.1.1.0' |
464 | === removed file 'mgmtsystem_review/migrations/6.1.1.0/openupgrade_analysis.txt' |
465 | --- mgmtsystem_review/migrations/6.1.1.0/openupgrade_analysis.txt 2012-12-19 19:36:39 +0000 |
466 | +++ mgmtsystem_review/migrations/6.1.1.0/openupgrade_analysis.txt 1970-01-01 00:00:00 +0000 |
467 | @@ -1,2 +0,0 @@ |
468 | ----mgmtsystem_review--- |
469 | -mgmtsystem_review / mgmtsystem.review / state (selection) : selection_keys is now '['done', 'open']' ('['c', 'o']') |
470 | |
471 | === removed file 'mgmtsystem_review/migrations/6.1.1.0/post-migration.py' |
472 | --- mgmtsystem_review/migrations/6.1.1.0/post-migration.py 2013-01-25 13:56:44 +0000 |
473 | +++ mgmtsystem_review/migrations/6.1.1.0/post-migration.py 1970-01-01 00:00:00 +0000 |
474 | @@ -1,35 +0,0 @@ |
475 | -# -*- coding: utf-8 -*- |
476 | -############################################################################## |
477 | -# |
478 | -# OpenERP, Open Source Management Solution |
479 | -# This module copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). |
480 | -# |
481 | -# This program is free software: you can redistribute it and/or modify |
482 | -# it under the terms of the GNU Affero General Public License as |
483 | -# published by the Free Software Foundation, either version 3 of the |
484 | -# License, or (at your option) any later version. |
485 | -# |
486 | -# This program is distributed in the hope that it will be useful, |
487 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
488 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
489 | -# GNU Affero General Public License for more details. |
490 | -# |
491 | -# You should have received a copy of the GNU Affero General Public License |
492 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
493 | -# |
494 | -############################################################################## |
495 | - |
496 | -import os |
497 | -from osv import osv |
498 | -import logging |
499 | - |
500 | -logger = logging.getLogger('upgrade') |
501 | - |
502 | -def migrate(cr, version): |
503 | - logger.info("Migrating mgmtsystem_review from version %s", version) |
504 | - |
505 | - logger.info("Updating state flags") |
506 | - cr.execute("update mgmtsystem_review set state = 'open' where state = 'o'") |
507 | - cr.execute("update mgmtsystem_review set state = 'done' where state = 'c'") |
508 | - |
509 | - logger.info("mgmtsystem_review update... done!") |
510 | |
511 | === added directory 'mgmtsystem_review/migrations/7.0.1.0' |
512 | === added file 'mgmtsystem_review/migrations/7.0.1.0/openupgrade_analysis.txt' |
513 | --- mgmtsystem_review/migrations/7.0.1.0/openupgrade_analysis.txt 1970-01-01 00:00:00 +0000 |
514 | +++ mgmtsystem_review/migrations/7.0.1.0/openupgrade_analysis.txt 2013-04-01 19:50:28 +0000 |
515 | @@ -0,0 +1,2 @@ |
516 | +---mgmtsystem_review--- |
517 | +mgmtsystem_review / mgmtsystem.review / state (selection) : selection_keys is now '['done', 'open']' ('['c', 'o']') |
518 | |
519 | === added file 'mgmtsystem_review/migrations/7.0.1.0/post-migration.py' |
520 | --- mgmtsystem_review/migrations/7.0.1.0/post-migration.py 1970-01-01 00:00:00 +0000 |
521 | +++ mgmtsystem_review/migrations/7.0.1.0/post-migration.py 2013-04-01 19:50:28 +0000 |
522 | @@ -0,0 +1,35 @@ |
523 | +# -*- coding: utf-8 -*- |
524 | +############################################################################## |
525 | +# |
526 | +# OpenERP, Open Source Management Solution |
527 | +# This module copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). |
528 | +# |
529 | +# This program is free software: you can redistribute it and/or modify |
530 | +# it under the terms of the GNU Affero General Public License as |
531 | +# published by the Free Software Foundation, either version 3 of the |
532 | +# License, or (at your option) any later version. |
533 | +# |
534 | +# This program is distributed in the hope that it will be useful, |
535 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
536 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
537 | +# GNU Affero General Public License for more details. |
538 | +# |
539 | +# You should have received a copy of the GNU Affero General Public License |
540 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
541 | +# |
542 | +############################################################################## |
543 | + |
544 | +import os |
545 | +from osv import osv |
546 | +import logging |
547 | + |
548 | +logger = logging.getLogger('upgrade') |
549 | + |
550 | +def migrate(cr, version): |
551 | + logger.info("Migrating mgmtsystem_review from version %s", version) |
552 | + |
553 | + logger.info("Updating state flags") |
554 | + cr.execute("update mgmtsystem_review set state = 'open' where state = 'o'") |
555 | + cr.execute("update mgmtsystem_review set state = 'done' where state = 'c'") |
556 | + |
557 | + logger.info("mgmtsystem_review update... done!") |
lgtm. not tested.