Repository
OCA/server-tools · module folder · Try on Runboat
Module version
Category
Tools
Folder size
1.99 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/server-tools
Last tracking update
2026-08-11 17:30:51
Authors
Odoo Community Association (OCA), Therp BV
Maintainers
Odoo Community Association (OCA), Therp BV
Committers
Stefan Rijnhart, Quoc - Pham Ngoc, Weblate, Ruchir Shukla, OCA-git-bot, Wolfgang Pichler, oca-ci, adrip-s73
Odoo dependencies
odoo/odoo:
Python dependencies
None
System dependencies
None
Required by
None
Description
Clean your Odoo database from remnants of modules, models, columns and
tables left by uninstalled modules (prior to 7.0) or a homebrew database
upgrade to a new major version of Odoo.

Caution! This module is potentially harmful and can *easily* destroy the
integrity of your data. Do not use if you are not entirely comfortable
with the technical details of the Odoo data model of *all* the modules
that have ever been installed on your database, and do not purge any
module, model, column or table if you do not know exactly what you are
doing.

Code Analysis

Views touched (18)
XML IDNameModelTypeStatus
cleanup_create_indexes_line_view_tree cleanup.create_indexes.line list Inherits tree_purge_line
cleanup_create_indexes_wizard_view_form cleanup.create_indexes.wizard form Inherits form_purge_wizard
form_purge_wizard cleanup.purge.wizard form New
purge_column_line_tree cleanup.purge.line.column list Inherits tree_purge_line
purge_columns_view cleanup.purge.wizard.column form Inherits form_purge_wizard
purge_data_line_tree cleanup.purge.line.data list Inherits tree_purge_line
purge_data_view cleanup.purge.wizard.data form Inherits form_purge_wizard
purge_field_line_tree cleanup.purge.line.field list Inherits tree_purge_line
purge_fields_view cleanup.purge.wizard.field form Inherits form_purge_wizard
purge_menu_line_tree cleanup.purge.line.menu list Inherits tree_purge_line
purge_menus_view cleanup.purge.wizard.menu form Inherits form_purge_wizard
purge_model_line_tree cleanup.purge.line.model list Inherits tree_purge_line
purge_models_view cleanup.purge.wizard.model form Inherits form_purge_wizard
purge_module_line_tree cleanup.purge.line.module list Inherits tree_purge_line
purge_modules_view cleanup.purge.wizard.module form Inherits form_purge_wizard
purge_table_line_tree cleanup.purge.line.table list Inherits tree_purge_line
purge_tables_view cleanup.purge.wizard.table form Inherits form_purge_wizard
tree_purge_line cleanup.purge.line list New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (21)

New fields (3)
  • field_id Many2one → ir.model.fields
    required=True args: 'ir.model.fields'
  • purged Boolean
    args: 'Created'
  • wizard_id Many2one → cleanup.create_indexes.wizard
    args: 'cleanup.create_indexes.wizard'
Public methods (1)
  • purge(self)

New fields (1)
  • purge_line_ids One2many → cleanup.create_indexes.line
    args: 'cleanup.create_indexes.line', 'wizard_id'
Public methods (1)
  • find(self)

New fields (3)
  • name Char
    readonly=True
  • purged Boolean
    readonly=True
  • wizard_id Many2one → cleanup.purge.wizard
    args: 'cleanup.purge.wizard'
Public methods (2)
  • create(self, values)
    @api.model_create_multi
  • purge(self)

New fields (2)
  • model_id Many2one → ir.model
    ondelete='CASCADE' required=True args: 'ir.model', 'Model'
  • wizard_id Many2one → cleanup.purge.wizard.column
    readonly=True args: 'cleanup.purge.wizard.column', 'Purge Wizard'
Public methods (1)
  • purge(self)
    Unlink columns upon manual confirmation.

New fields (2)
  • data_id Many2one → ir.model.data
    args: 'ir.model.data', 'Data entry'
  • wizard_id Many2one → cleanup.purge.wizard.data
    readonly=True args: 'cleanup.purge.wizard.data', 'Purge Wizard'
Public methods (1)
  • purge(self)
    Unlink data entries upon manual confirmation.

New fields (4)
  • field_id Many2one → ir.model.fields
    comodel_name='ir.model.fields' string='Field'
  • model_id Many2one → ir.model
    comodel_name='ir.model' related='field_id.model_id' store=True string='Model'
  • model_name Char
    related='model_id.model' store=True string='Model Technical Name'
  • wizard_id Many2one → cleanup.purge.wizard.field
    readonly=True args: 'cleanup.purge.wizard.field', 'Purge Wizard'
Public methods (1)
  • purge(self)
    Unlink fields upon manual confirmation.

New fields (2)
  • menu_id Many2one → ir.ui.menu
    args: 'ir.ui.menu', 'Menu entry'
  • wizard_id Many2one → cleanup.purge.wizard.menu
    readonly=True args: 'cleanup.purge.wizard.menu', 'Purge Wizard'
Public methods (1)
  • purge(self)
    Unlink menu entries upon manual confirmation.

New fields (1)
  • wizard_id Many2one → cleanup.purge.wizard.model
    readonly=True args: 'cleanup.purge.wizard.model', 'Purge Wizard'
Public methods (1)
  • purge(self)
    Unlink models upon manual confirmation.

New fields (1)
  • wizard_id Many2one → cleanup.purge.wizard.module
    readonly=True args: 'cleanup.purge.wizard.module', 'Purge Wizard'
Public methods (1)
  • purge(self)
    Uninstall modules upon manual confirmation, then reload the database.

New fields (2)
  • table_type Selection
    selection=_TABLE_TYPE_SELECTION
  • wizard_id Many2one → cleanup.purge.wizard.table
    readonly=True args: 'cleanup.purge.wizard.table', 'Purge Wizard'
Public methods (1)
  • purge(self)
    Unlink tables upon manual confirmation.

New fields (1)
  • purge_line_ids One2many → cleanup.purge.line
    args: 'cleanup.purge.line', 'wizard_id'
Public methods (6)
  • create(self, values)
    @api.model_create_multi
  • default_get(self, fields_list)
    @api.model
  • find(self)
  • get_wizard_action(self)
    @api.model
  • purge_all(self)
  • select_lines(self)

New fields (1)
  • purge_line_ids One2many → cleanup.purge.line.column
    args: 'cleanup.purge.line.column', 'wizard_id', 'Columns to purge'
Public methods (2)
  • find(self)
    @api.model
    Search for columns that are not in the corresponding model. Group models by table to prevent false positives for columns that are only in some of the models sharing the same table. Example of this is 'sale_id' not being a field of stock.picking.in
  • get_orphaned_columns(self, model_pools)
    @api.model
    From openobject-server/openerp/osv/orm.py Iterate on the database columns to identify columns of fields which have been removed

New fields (1)
  • purge_line_ids One2many → cleanup.purge.line.data
    args: 'cleanup.purge.line.data', 'wizard_id', 'Data to purge'
Public methods (1)
  • find(self)
    @api.model
    Collect all rows from ir_model_data that refer to a nonexisting model, or to a nonexisting row in the model's table.

New fields (1)
  • purge_line_ids One2many → cleanup.purge.line.field
    args: 'cleanup.purge.line.field', 'wizard_id', 'Fields to purge'
Public methods (1)
  • find(self)
    @api.model
    Search for fields not technically mapped to a model.

New fields (1)
  • purge_line_ids One2many → cleanup.purge.line.menu
    args: 'cleanup.purge.line.menu', 'wizard_id', 'Menus to purge'
Public methods (1)
  • find(self)
    @api.model
    Search for models that cannot be instantiated.

New fields (1)
  • purge_line_ids One2many → cleanup.purge.line.model
    args: 'cleanup.purge.line.model', 'wizard_id', 'Models to purge'
Public methods (1)
  • find(self)
    @api.model
    Search for models that cannot be instantiated.

New fields (1)
  • purge_line_ids One2many → cleanup.purge.line.module
    args: 'cleanup.purge.line.module', 'wizard_id', 'Modules to purge'
Public methods (1)
  • find(self)
    @api.model

New fields (1)
  • purge_line_ids One2many → cleanup.purge.line.table
    args: 'cleanup.purge.line.table', 'wizard_id', 'Tables to purge'
Public methods (1)
  • find(self)
    @api.model
    Search for tables and views that cannot be instantiated.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…