From 1d5272071d7af6c0680a952cfaa6635cdffacf32 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Mon, 15 Feb 2010 14:36:08 +0530 Subject: [PATCH] [FIX] Fields.function : if store={}/True is removed,column should be dropped with cascaded effect bzr revid: jvo@tinyerp.com-20100215090608-o6lq314ya0xslukl --- bin/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index dea337e35c5..3e8f869e4ea 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1862,7 +1862,7 @@ class orm(orm_template): f_pg_notnull = f_pg_def['attnotnull'] if isinstance(f, fields.function) and not f.store: logger.notifyChannel('orm', netsvc.LOG_INFO, 'column %s (%s) in table %s removed: converted to a function !\n' % (k, f.string, self._table)) - cr.execute('ALTER TABLE "%s" DROP COLUMN "%s"'% (self._table, k)) + cr.execute('ALTER TABLE "%s" DROP COLUMN "%s" CASCADE'% (self._table, k)) cr.commit() f_obj_type = None else: