Merge lp:~therp-nl/openupgrade-addons/6.1-crm-base_action_rule-stock-procurement-sale into lp:openupgrade-addons/6.1

Proposed by Holger Brunn (Therp)
Status: Merged
Merged at revision: 6600
Proposed branch: lp:~therp-nl/openupgrade-addons/6.1-crm-base_action_rule-stock-procurement-sale
Merge into: lp:openupgrade-addons/6.1
Diff against target: 141 lines (+88/-2)
10 files modified
base_action_rule/migrations/6.1.1.0/user_notes.txt (+1/-0)
base_calendar/migrations/6.1.1.0/pre-migration.py (+23/-0)
base_calendar/migrations/6.1.1.0/user_notes.txt (+1/-2)
crm/migrations/6.1.1.0/data/crm_lead_view.xml (+14/-0)
crm/migrations/6.1.1.0/post-migration.py (+17/-0)
crm/migrations/6.1.1.0/pre-migration.py (+24/-0)
crm/migrations/6.1.1.0/user_notes.txt (+5/-0)
procurement/migrations/6.1.1.0/user_notes.txt (+1/-0)
sale/migrations/6.1.1.0/user_notes.txt (+1/-0)
stock/migrations/6.1.1.1/user_notes.txt (+1/-0)
To merge this branch: bzr merge lp:~therp-nl/openupgrade-addons/6.1-crm-base_action_rule-stock-procurement-sale
Reviewer Review Type Date Requested Status
OpenUpgrade Committers Pending
Review via email: mp+108920@code.launchpad.net
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=== added file 'base_action_rule/migrations/6.1.1.0/user_notes.txt'
2--- base_action_rule/migrations/6.1.1.0/user_notes.txt 1970-01-01 00:00:00 +0000
3+++ base_action_rule/migrations/6.1.1.0/user_notes.txt 2012-06-06 15:46:26 +0000
4@@ -0,0 +1,1 @@
5+Nothing to do for module 'base_action_rule'
6
7=== added file 'base_calendar/migrations/6.1.1.0/pre-migration.py'
8--- base_calendar/migrations/6.1.1.0/pre-migration.py 1970-01-01 00:00:00 +0000
9+++ base_calendar/migrations/6.1.1.0/pre-migration.py 2012-06-06 15:46:26 +0000
10@@ -0,0 +1,23 @@
11+# -*- coding: utf-8 -*-
12+
13+from osv import osv
14+import pooler, logging
15+from openerp.openupgrade import openupgrade
16+
17+logger = logging.getLogger('OpenUpgrade')
18+me = __file__
19+
20+def migrate_calendar_event_table(cr, table_name):
21+ """migrates a table that inherited calendar_event
22+ @param cr: db cursor
23+ @param table_name: the table that inherited calendar_event
24+ """
25+ cr.execute("update %s set count=100, end_type='count' where end_type='forever'" % table_name)
26+
27+
28+def migrate(cr, version):
29+ try:
30+ logger.info("%s called", me)
31+ migrate_calendar_event_table(cr, 'calendar_event')
32+ except Exception, e:
33+ raise osv.except_osv("OpenUpgrade", '%s: %s' % (me, e))
34
35=== modified file 'base_calendar/migrations/6.1.1.0/user_notes.txt'
36--- base_calendar/migrations/6.1.1.0/user_notes.txt 2012-02-23 23:23:05 +0000
37+++ base_calendar/migrations/6.1.1.0/user_notes.txt 2012-06-06 15:46:26 +0000
38@@ -1,3 +1,2 @@
39 A new security rule is loaded to grant read access on calendars for survey users.
40-
41-
42+End type 'forever' was removed for repeating calendar_events. As this was handled internally as end type 'count' with 100 repeats, the migration converts those events to just that.
43
44=== added directory 'crm/migrations/6.1.1.0/data'
45=== added file 'crm/migrations/6.1.1.0/data/crm_lead_view.xml'
46--- crm/migrations/6.1.1.0/data/crm_lead_view.xml 1970-01-01 00:00:00 +0000
47+++ crm/migrations/6.1.1.0/data/crm_lead_view.xml 2012-06-06 15:46:26 +0000
48@@ -0,0 +1,14 @@
49+<?xml version="1.0"?>
50+<openerp>
51+<data>
52+ <record id="crm_lead_stage_act" model="ir.actions.act_window">
53+ <field name="name">Stages</field>
54+ <field name="res_model">crm.case.stage</field>
55+ <field name="view_type">form</field>
56+ <field name="view_id" ref="crm.crm_case_stage_tree"/>
57+ <field name="help">Add specific stages to leads and opportunities allowing your sales to better organise their sales pipeline. Stages will allow them to easily track how a specific lead or opportunity is positioned in the sales cycle.</field>
58+ <field name="domain" />
59+ <field name="context">{}</field>
60+ </record>
61+</data>
62+</openerp>
63
64=== added file 'crm/migrations/6.1.1.0/post-migration.py'
65--- crm/migrations/6.1.1.0/post-migration.py 1970-01-01 00:00:00 +0000
66+++ crm/migrations/6.1.1.0/post-migration.py 2012-06-06 15:46:26 +0000
67@@ -0,0 +1,17 @@
68+# -*- coding: utf-8 -*-
69+
70+from osv import osv
71+import pooler, logging
72+from openerp.openupgrade import openupgrade
73+
74+from openerp import SUPERUSER_ID
75+
76+logger = logging.getLogger('OpenUpgrade')
77+me = __file__
78+
79+def migrate(cr, version):
80+ try:
81+ #former versions added domains and contexts for crm.case.stage's type field - remove them
82+ openupgrade.load_data(cr, 'crm', 'migrations/6.1.1.0/data/crm_lead_view.xml')
83+ except Exception, e:
84+ raise osv.except_osv("OpenUpgrade", '%s: %s' % (me, e))
85
86=== added file 'crm/migrations/6.1.1.0/pre-migration.py'
87--- crm/migrations/6.1.1.0/pre-migration.py 1970-01-01 00:00:00 +0000
88+++ crm/migrations/6.1.1.0/pre-migration.py 2012-06-06 15:46:26 +0000
89@@ -0,0 +1,24 @@
90+# -*- coding: utf-8 -*-
91+
92+from osv import osv
93+import pooler, logging
94+import os
95+import base_calendar
96+from openerp.openupgrade import openupgrade
97+from imp import load_source
98+from openerp import SUPERUSER_ID
99+
100+logger = logging.getLogger('OpenUpgrade')
101+me = __file__
102+
103+def migrate(cr, version):
104+ try:
105+ #base_calendar's migration script defines a function to migrate tables that inherit calendar_event
106+ base_calendar_migration=load_source('base_calendar_migration', os.path.join(base_calendar.__path__[0], 'migrations', '6.1.1.0', 'pre-migration.py'))
107+ base_calendar_migration.migrate_calendar_event_table(cr, 'crm_meeting')
108+
109+ if openupgrade.table_exists(cr, 'res_partner_canal') and not openupgrade.table_exists(cr, 'crm_case_channel'):
110+ openupgrade.rename_tables(cr, [('res_partner_canal', 'crm_case_channel')])
111+ openupgrade.rename_models(cr, [('res.partner.canal', 'crm.case.channel')])
112+ except Exception, e:
113+ raise osv.except_osv("OpenUpgrade", '%s: %s' % (me, e))
114
115=== added file 'crm/migrations/6.1.1.0/user_notes.txt'
116--- crm/migrations/6.1.1.0/user_notes.txt 1970-01-01 00:00:00 +0000
117+++ crm/migrations/6.1.1.0/user_notes.txt 2012-06-06 15:46:26 +0000
118@@ -0,0 +1,5 @@
119+Deleted fields:
120+- type in crm_case_stage
121+- freq in crm_meeting
122+- canal_id in crm_phonecall
123+they still exist in the database in case you need them.
124
125=== added file 'procurement/migrations/6.1.1.0/user_notes.txt'
126--- procurement/migrations/6.1.1.0/user_notes.txt 1970-01-01 00:00:00 +0000
127+++ procurement/migrations/6.1.1.0/user_notes.txt 2012-06-06 15:46:26 +0000
128@@ -0,0 +1,1 @@
129+Nothing to do for module 'procurement'
130
131=== added file 'sale/migrations/6.1.1.0/user_notes.txt'
132--- sale/migrations/6.1.1.0/user_notes.txt 1970-01-01 00:00:00 +0000
133+++ sale/migrations/6.1.1.0/user_notes.txt 2012-06-06 15:46:26 +0000
134@@ -0,0 +1,1 @@
135+Nothing to do for module 'sale'
136
137=== added file 'stock/migrations/6.1.1.1/user_notes.txt'
138--- stock/migrations/6.1.1.1/user_notes.txt 1970-01-01 00:00:00 +0000
139+++ stock/migrations/6.1.1.1/user_notes.txt 2012-06-06 15:46:26 +0000
140@@ -0,0 +1,1 @@
141+Nothing to do for module 'stock'

Subscribers

People subscribed via source and target branches