diff --git a/database_cleanup/model/purge_data.py b/database_cleanup/model/purge_data.py index 4aa80c886..1d5741abc 100644 --- a/database_cleanup/model/purge_data.py +++ b/database_cleanup/model/purge_data.py @@ -28,9 +28,9 @@ class CleanupPurgeLineData(orm.TransientModel): _name = 'cleanup.purge.line.data' _columns = { - 'model_id': fields.many2one( - 'ir.model', 'Model', - required=True, ondelete='CASCADE'), + 'data_id': fields.many2one( + 'ir.model.data', 'Data entry', + ondelete='SET NULL'), 'wizard_id': fields.many2one( 'cleanup.purge.wizard.data', 'Purge Wizard', readonly=True), } @@ -99,7 +99,4 @@ class CleanupPurgeWizardData(orm.TransientModel): 'purge_line_ids': fields.one2many( 'cleanup.purge.line.data', 'wizard_id', 'Data to purge'), - 'data_id': fields.many2one( - 'ir.model.data', 'Data entry', - ondelete='SET NULL'), } diff --git a/database_cleanup/view/purge_data.xml b/database_cleanup/view/purge_data.xml index d45422027..e749f4569 100644 --- a/database_cleanup/view/purge_data.xml +++ b/database_cleanup/view/purge_data.xml @@ -6,7 +6,7 @@ Form view for purge data wizard cleanup.purge.wizard.data -
+

@@ -14,7 +14,7 @@ - +