From e4340ed78795c6a0666d4b99ce4c6b744fe6db5a Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Fri, 17 Jul 2015 12:15:42 +0200 Subject: [PATCH] [IMP] allow to select lines to purge in a tree view [IMP] adaptto upstream changes --- database_cleanup/model/purge_wizard.py | 9 ++++ database_cleanup/view/purge_columns.xml | 62 +++++++++++++++++-------- database_cleanup/view/purge_data.xml | 62 +++++++++++++++++-------- database_cleanup/view/purge_menus.xml | 48 ++++++++++++++++--- database_cleanup/view/purge_models.xml | 60 ++++++++++++++++-------- database_cleanup/view/purge_modules.xml | 60 ++++++++++++++++-------- database_cleanup/view/purge_tables.xml | 41 +++++++++++----- 7 files changed, 246 insertions(+), 96 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..0f335ea28 100644 --- a/database_cleanup/view/purge_columns.xml +++ b/database_cleanup/view/purge_columns.xml @@ -11,15 +11,20 @@