From 7ab70cab7486e655dc17fec3021cf22a67e10f40 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Wed, 4 Feb 2015 14:44:50 +0100 Subject: [PATCH] [IMP] models.py: do not log handled "bad query" --- openerp/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/models.py b/openerp/models.py index 9529c3e1e5e..c929d3be120 100644 --- a/openerp/models.py +++ b/openerp/models.py @@ -2508,7 +2508,7 @@ class BaseModel(object): if f_pg_type == 'varchar' and f._type in ('char', 'selection') and f_pg_size and (f.size is None or f_pg_size < f.size): try: with cr.savepoint(): - cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" TYPE %s' % (self._table, k, pg_varchar(f.size))) + cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" TYPE %s' % (self._table, k, pg_varchar(f.size)), log_exceptions=False) except psycopg2.NotSupportedError: # In place alter table cannot be done because a view is depending of this field. # Do a manual copy. This will drop the view (that will be recreated later)