credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #05732
[Merge] lp:~therp-nl/openupgrade-server/7.0-fix_client_action_table into lp:openupgrade-server
Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/openupgrade-server/7.0-fix_client_action_table into lp:openupgrade-server.
Requested reviews:
OpenUpgrade Committers (openupgrade-committers)
For more details, see:
https://code.launchpad.net/~therp-nl/openupgrade-server/7.0-fix_client_action_table/+merge/203110
See https://code.launchpad.net/~therp-nl/openupgrade-server/6.1-fix_client_action_table/+merge/203112
--
https://code.launchpad.net/~therp-nl/openupgrade-server/7.0-fix_client_action_table/+merge/203110
Your team OpenUpgrade Committers is requested to review the proposed merge of lp:~therp-nl/openupgrade-server/7.0-fix_client_action_table into lp:openupgrade-server.
=== modified file 'openerp/addons/base/migrations/7.0.1.3/pre-migration.py'
--- openerp/addons/base/migrations/7.0.1.3/pre-migration.py 2013-11-14 17:33:14 +0000
+++ openerp/addons/base/migrations/7.0.1.3/pre-migration.py 2014-01-24 16:51:37 +0000
@@ -88,7 +88,14 @@
"""
Inject snippets of openerp/addons/base/base.sql, needed
to upgrade the base module.
+
+ Also check existing inheritance of ir_act_client on ir_actions.
+ For ir_act_client to inherit ir_actions at table level
+ is not new in 7.0, but this was not taken care of properly in
+ OpenUpgrade 6.1 for a long time, so we do it again here.
+ This will fix up databases that were migrated earlier on.
"""
+
cr.execute("""
CREATE TABLE ir_model_constraint (
id serial NOT NULL,
@@ -117,6 +124,17 @@
);
""")
+ cr.execute(
+ """
+ SELECT count(*) from pg_catalog.pg_inherits
+ WHERE inhrelid = 'public.ir_act_client'::regclass::oid
+ AND inhparent = 'public.ir_actions'::regclass::oid
+ """)
+ res = cr.fetchone()
+ if not res[0]:
+ cr.execute(
+ "ALTER TABLE ir_act_client INHERIT ir_actions")
+
def create_users_partner(cr):
"""
Users now have an inherits on res.partner.
Follow ups