From aa38f9dbc623f91a12eb544dd1da9b79852b0623 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Fri, 17 Jul 2015 12:15:42 +0200 Subject: [PATCH 01/13] [IMP] allow to select lines to purge in a tree view --- database_cleanup/model/purge_wizard.py | 9 +++++ database_cleanup/view/purge_columns.xml | 52 +++++++++++++++++++++---- database_cleanup/view/purge_data.xml | 52 +++++++++++++++++++++---- database_cleanup/view/purge_models.xml | 50 ++++++++++++++++++++---- database_cleanup/view/purge_modules.xml | 50 ++++++++++++++++++++---- database_cleanup/view/purge_tables.xml | 31 +++++++++++++++ 6 files changed, 214 insertions(+), 30 deletions(-) diff --git a/database_cleanup/model/purge_wizard.py b/database_cleanup/model/purge_wizard.py index ae9430b90..f02f5dbc2 100644 --- a/database_cleanup/model/purge_wizard.py +++ b/database_cleanup/model/purge_wizard.py @@ -73,6 +73,15 @@ class PurgeWizard(orm.AbstractModel): }, } + def select_lines(self, cr, uid, ids, context=None): + return { + 'type': 'ir.actions.act_window', + 'name': 'Select lines to purge', + 'views': [(False, 'tree'), (False, 'form')], + 'res_model': self._columns['purge_line_ids']._obj, + 'domain': [('wizard_id', 'in', ids)], + } + _columns = { 'name': fields.char('Name', size=64, readonly=True), } diff --git a/database_cleanup/view/purge_columns.xml b/database_cleanup/view/purge_columns.xml index 96aa1212e..8e0aa2578 100644 --- a/database_cleanup/view/purge_columns.xml +++ b/database_cleanup/view/purge_columns.xml @@ -11,15 +11,20 @@