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