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 @@
+
-
-
-
-
-
-
+
@@ -30,20 +35,37 @@
ir.actions.server
code
-
-wizard_id = self.create(cr, uid, {}, context=context)
-action = {
- 'type': 'ir.actions.act_window',
- 'views': [(False, 'form')],
- 'res_model': 'cleanup.purge.wizard.column',
- 'res_id': wizard_id,
- 'flags': {
- 'action_buttons': False,
- 'sidebar': False,
- },
-}
+ action = self.get_wizard_action(cr, uid, context=context)
+
+
+
+ cleanup.purge.line.column
+
+
+
+
+
+
+
+
+ Purge
+ ir.actions.server
+ code
+
+ self.purge(cr, uid, context.get('active_ids', []), context)
+
+
+
+ Purge
+ action
+ client_action_multi
+ cleanup.purge.line.column
+
+
diff --git a/database_cleanup/view/purge_data.xml b/database_cleanup/view/purge_data.xml
index 890d0d450..7fa361b90 100644
--- a/database_cleanup/view/purge_data.xml
+++ b/database_cleanup/view/purge_data.xml
@@ -11,15 +11,20 @@
+
-
-
-
-
-
-
+
@@ -30,20 +35,37 @@
ir.actions.server
code
-
-wizard_id = self.create(cr, uid, {}, context=context)
-action = {
- 'type': 'ir.actions.act_window',
- 'views': [(False, 'form')],
- 'res_model': 'cleanup.purge.wizard.data',
- 'res_id': wizard_id,
- 'flags': {
- 'action_buttons': False,
- 'sidebar': False,
- },
-}
+ action = self.get_wizard_action(cr, uid, context=context)
+
+
+
+ cleanup.purge.line.data
+
+
+
+
+
+
+
+
+ Purge
+ ir.actions.server
+ code
+
+ self.purge(cr, uid, context.get('active_ids', []), context)
+
+
+
+ Purge
+ action
+ client_action_multi
+ cleanup.purge.line.data
+
+
diff --git a/database_cleanup/view/purge_menus.xml b/database_cleanup/view/purge_menus.xml
index fc9a5a2cc..23913cfe1 100644
--- a/database_cleanup/view/purge_menus.xml
+++ b/database_cleanup/view/purge_menus.xml
@@ -10,18 +10,24 @@
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/database_cleanup/view/purge_models.xml b/database_cleanup/view/purge_models.xml
index 2dc25c74c..754666e6d 100644
--- a/database_cleanup/view/purge_models.xml
+++ b/database_cleanup/view/purge_models.xml
@@ -11,14 +11,19 @@
+
-
-
-
-
-
+
@@ -29,20 +34,37 @@
ir.actions.server
code
-
-wizard_id = self.create(cr, uid, {}, context=context)
-action = {
- 'type': 'ir.actions.act_window',
- 'views': [(False, 'form')],
- 'res_model': 'cleanup.purge.wizard.model',
- 'res_id': wizard_id,
- 'flags': {
- 'action_buttons': False,
- 'sidebar': False,
- },
-}
+ action = self.get_wizard_action(cr, uid, context=context)
+
+
+
+ cleanup.purge.line.model
+
+
+
+
+
+
+
+ Purge
+ ir.actions.server
+ code
+
+ self.purge(cr, uid, context.get('active_ids', []), context)
+
+
+
+ Purge
+ action
+ client_action_multi
+ cleanup.purge.line.model
+
+
+
diff --git a/database_cleanup/view/purge_modules.xml b/database_cleanup/view/purge_modules.xml
index 65dd5473a..73429b517 100644
--- a/database_cleanup/view/purge_modules.xml
+++ b/database_cleanup/view/purge_modules.xml
@@ -11,14 +11,19 @@
+
-
-
-
-
-
+
@@ -29,20 +34,37 @@
ir.actions.server
code
-
-wizard_id = self.create(cr, uid, {}, context=context)
-action = {
- 'type': 'ir.actions.act_window',
- 'views': [(False, 'form')],
- 'res_model': 'cleanup.purge.wizard.module',
- 'res_id': wizard_id,
- 'flags': {
- 'action_buttons': False,
- 'sidebar': False,
- },
-}
+ action = self.get_wizard_action(cr, uid, context=context)
+
+
+
+ cleanup.purge.line.module
+
+
+
+
+
+
+
+ Purge
+ ir.actions.server
+ code
+
+ self.purge(cr, uid, context.get('active_ids', []), context)
+
+
+
+ Purge
+ action
+ client_action_multi
+ cleanup.purge.line.module
+
+
+
diff --git a/database_cleanup/view/purge_tables.xml b/database_cleanup/view/purge_tables.xml
index b963a2f02..66bd28cc1 100644
--- a/database_cleanup/view/purge_tables.xml
+++ b/database_cleanup/view/purge_tables.xml
@@ -11,6 +11,7 @@
+
@@ -29,20 +30,36 @@
ir.actions.server
code
-
-wizard_id = self.create(cr, uid, {}, context=context)
-action = {
- 'type': 'ir.actions.act_window',
- 'views': [(False, 'form')],
- 'res_model': 'cleanup.purge.wizard.table',
- 'res_id': wizard_id,
- 'flags': {
- 'action_buttons': False,
- 'sidebar': False,
- },
-}
+ action = self.get_wizard_action(cr, uid, context=context)
+
+
+
+ cleanup.purge.line.table
+
+
+
+
+
+
+
+ Purge
+ ir.actions.server
+ code
+
+ self.purge(cr, uid, context.get('active_ids', []), context)
+
+
+
+ Purge
+ action
+ client_action_multi
+ cleanup.purge.line.table
+
+