diff --git a/database_cleanup/__openerp__.py b/database_cleanup/__openerp__.py index ab839f57f..a164e6043 100644 --- a/database_cleanup/__openerp__.py +++ b/database_cleanup/__openerp__.py @@ -22,7 +22,7 @@ { 'name': 'Database cleanup', 'version': '0.1', - 'author': 'Therp BV', + 'author': "Therp BV,Odoo Community Association (OCA)", 'depends': ['base'], 'license': 'AGPL-3', 'category': 'Tools', diff --git a/database_cleanup/model/purge_columns.py b/database_cleanup/model/purge_columns.py index 60b56ccc8..abcf1d2d4 100644 --- a/database_cleanup/model/purge_columns.py +++ b/database_cleanup/model/purge_columns.py @@ -96,8 +96,9 @@ class CleanupPurgeWizardColumn(orm.TransientModel): columns = list(set([ column for model_pool in model_pools for column in model_pool._columns - if not (isinstance(model_pool._columns[column], fields.function) - and not model_pool._columns[column].store) + if not (isinstance(model_pool._columns[column], + fields.function) and + not model_pool._columns[column].store) ])) columns += orm.MAGIC_COLUMNS columns += self.blacklist.get(model_pools[0]._table, []) diff --git a/database_cleanup/model/purge_tables.py b/database_cleanup/model/purge_tables.py index 8d9c86544..50bf3d8e6 100644 --- a/database_cleanup/model/purge_tables.py +++ b/database_cleanup/model/purge_tables.py @@ -110,9 +110,9 @@ class CleanupPurgeWizardTable(orm.TransientModel): known_tables += [ column._sql_names(model_pool)[0] for column in model_pool._columns.values() - if column._type == 'many2many' - # unstored function fields of type m2m don't have _rel - and hasattr(column, '_rel') + if (column._type == 'many2many' and + hasattr(column, '_rel')) # unstored function fields of + # type m2m don't have _rel ] # Cannot pass table names as a psycopg argument