diff --git a/bin/addons/base/migrations/1.2/pre-10-ir_property_rename_column.py b/bin/addons/base/migrations/1.2/pre-10-ir_property_rename_column.py deleted file mode 100644 index 8c79e735c30..00000000000 --- a/bin/addons/base/migrations/1.2/pre-10-ir_property_rename_column.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf8 -*- - -__name__ = "ir.property: Rename column value to value_reference" - -def migrate(cr, version): - rename_column(cr, 'ir_property', 'value', 'value_reference') - -def column_exists(cr, table, column): - cr.execute("SELECT count(1)" - " FROM pg_class c, pg_attribute a" - " WHERE c.relname=%s" - " AND c.oid=a.attrelid" - " AND a.attname=%s", - (table, column)) - return cr.fetchone()[0] != 0 - -def rename_column(cr, table, old, new): - if column_exists(cr, table, old) and not column_exists(cr, table, new): - cr.execute('ALTER TABLE "%s" RENAME COLUMN "%s" TO "%s"' % (table, old, new)) - diff --git a/bin/addons/base/migrations/1.2/pre-10-res_address_fuction_change_type.py b/bin/addons/base/migrations/1.2/pre-10-res_address_fuction_change_type.py deleted file mode 100644 index 96173c775a6..00000000000 --- a/bin/addons/base/migrations/1.2/pre-10-res_address_fuction_change_type.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf8 -*- - -__name__ = "res.partner.address: change type of 'function' field many2one to char" - -def migrate(cr, version): - change_column_type(cr,'res_partner_address') - -def change_column_type(cr,table): - cr.execute('SELECT id, name FROM res_partner_function') - all_function = cr.fetchall() - cr.execute('ALTER TABLE %s ADD COLUMN temp_function VARCHAR(64)' % table) - for fn in all_function: - cr.execute("UPDATE %s SET temp_function = '%s' WHERE function = %s" % (table,fn[1],fn[0])) - cr.execute("ALTER TABLE %s DROP COLUMN function CASCADE" % table) - cr.execute("ALTER TABLE %s RENAME COLUMN temp_function TO function" % table) - diff --git a/bin/addons/base/res/partner/partner_view.xml b/bin/addons/base/res/partner/partner_view.xml index 2a47ba471a0..dbe19959445 100644 --- a/bin/addons/base/res/partner/partner_view.xml +++ b/bin/addons/base/res/partner/partner_view.xml @@ -11,9 +11,6 @@ - - -