[MIG] database_cleanup: Migration to 16.0

pull/2684/head
Joel Zilli 2022-11-24 09:50:23 -03:00 committed by Miika Nissi
parent 07e00cf1e0
commit 6be193348a
No known key found for this signature in database
GPG Key ID: B20DC9FCFAF92E7F
9 changed files with 29 additions and 586 deletions

View File

@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Database cleanup",
"version": "14.0.1.0.0",
"version": "16.0.1.0.0",
"author": "Therp BV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-tools",
"depends": ["base"],

View File

@ -1,568 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * database_cleanup
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-04-16 16:02+0000\n"
"PO-Revision-Date: 2016-07-09 10:34+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_column__purge_line_ids
msgid "Columns to purge"
msgstr "Columns to purge"
#. module: database_cleanup
#: model:ir.actions.server,name:database_cleanup.cleanup_create_indexes_line_action
#: model_terms:ir.ui.view,arch_db:database_cleanup.cleanup_create_indexes_wizard_view_form
#, fuzzy
#| msgid "Created by"
msgid "Create"
msgstr "Created by"
#. module: database_cleanup
#: model_terms:ir.ui.view,arch_db:database_cleanup.cleanup_create_indexes_wizard_view_form
#, fuzzy
#| msgid "Created by"
msgid "Create all"
msgstr "Created by"
#. module: database_cleanup
#: model:ir.model,name:database_cleanup.model_cleanup_create_indexes_wizard
#, fuzzy
#| msgid "Created on"
msgid "Create indexes"
msgstr "Created on"
#. module: database_cleanup
#: model:ir.actions.server,name:database_cleanup.cleanup_create_indexes_wizard_action
#: model:ir.ui.menu,name:database_cleanup.menu_create_indexes
msgid "Create missing indexes"
msgstr ""
#. module: database_cleanup
#: model_terms:ir.ui.view,arch_db:database_cleanup.cleanup_create_indexes_line_view_tree
#, fuzzy
#| msgid "Purge this model"
msgid "Create this index"
msgstr "Purge this model"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_line__purged
#, fuzzy
#| msgid "Created by"
msgid "Created"
msgstr "Created by"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_line__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_wizard__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_column__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_data__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_menu__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_model__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_module__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_property__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_table__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_column__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_data__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_menu__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_model__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_module__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_property__create_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_table__create_uid
msgid "Created by"
msgstr "Created by"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_line__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_wizard__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_column__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_data__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_menu__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_model__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_module__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_property__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_table__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_column__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_data__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_menu__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_model__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_module__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_property__create_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_table__create_date
msgid "Created on"
msgstr "Created on"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_data__data_id
msgid "Data entry"
msgstr "Data entry"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_data__purge_line_ids
msgid "Data to purge"
msgstr "Data to purge"
#. module: database_cleanup
#: model:ir.ui.menu,name:database_cleanup.menu_database_cleanup
msgid "Database cleanup"
msgstr "Database cleanup"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_line__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_wizard__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_column__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_data__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_menu__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_model__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_module__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_property__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_table__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_column__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_data__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_menu__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_model__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_module__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_property__display_name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_table__display_name
msgid "Display Name"
msgstr "Display Name"
#. module: database_cleanup
#: selection:cleanup.purge.line.property,reason:0
msgid "Duplicated property"
msgstr ""
#. module: database_cleanup
#: selection:cleanup.purge.line.property,reason:0
msgid "Empty default property"
msgstr ""
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_line__field_id
msgid "Field"
msgstr ""
#. module: database_cleanup
#: model:ir.model,name:database_cleanup.model_ir_model_fields
msgid "Fields"
msgstr ""
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_line__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_wizard__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_column__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_data__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_menu__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_model__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_module__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_property__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_table__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_column__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_data__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_menu__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_model__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_module__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_property__id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_table__id
msgid "ID"
msgstr "ID"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_line____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_wizard____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_column____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_data____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_menu____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_model____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_module____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_property____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_table____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_column____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_data____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_menu____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_model____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_module____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_property____last_update
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_table____last_update
msgid "Last Modified on"
msgstr "Last Modified on"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_line__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_wizard__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_column__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_data__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_menu__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_model__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_module__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_property__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_table__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_column__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_data__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_menu__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_model__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_module__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_property__write_uid
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_table__write_uid
msgid "Last Updated by"
msgstr "Last Updated by"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_line__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_wizard__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_column__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_data__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_menu__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_model__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_module__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_property__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_table__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_column__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_data__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_menu__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_model__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_module__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_property__write_date
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_table__write_date
msgid "Last Updated on"
msgstr "Last Updated on"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_menu__menu_id
msgid "Menu entry"
msgstr "Menu entry"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_menu__purge_line_ids
msgid "Menus to purge"
msgstr "Menus to purge"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_column__model_id
msgid "Model"
msgstr "Model"
#. module: database_cleanup
#: model:ir.model,name:database_cleanup.model_ir_model_data
msgid "Model Data"
msgstr ""
#. module: database_cleanup
#: model:ir.model,name:database_cleanup.model_ir_model
msgid "Models"
msgstr "Models"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_model__purge_line_ids
msgid "Models to purge"
msgstr "Models to purge"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_module__purge_line_ids
msgid "Modules to purge"
msgstr "Modules to purge"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_line__name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line__name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_column__name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_data__name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_menu__name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_model__name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_module__name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_property__name
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_table__name
msgid "Name"
msgstr "Name"
#. module: database_cleanup
#: code:addons/database_cleanup/models/purge_menus.py:54
#, python-format
msgid "No dangling menu entries found"
msgstr "No dangling menu entries found"
#. module: database_cleanup
#: code:addons/database_cleanup/models/purge_modules.py:83
#, python-format
msgid "No modules found to purge"
msgstr "No modules found to purge"
#. module: database_cleanup
#: code:addons/database_cleanup/models/purge_columns.py:128
#, python-format
msgid "No orphaned columns found"
msgstr "No orphaned columns found"
#. module: database_cleanup
#: code:addons/database_cleanup/models/purge_data.py:68
#, python-format
msgid "No orphaned data entries found"
msgstr "No orphaned data entries found"
#. module: database_cleanup
#: code:addons/database_cleanup/models/purge_models.py:113
#, python-format
msgid "No orphaned models found"
msgstr "No orphaned models found"
#. module: database_cleanup
#: code:addons/database_cleanup/models/purge_tables.py:107
#, python-format
msgid "No orphaned tables found"
msgstr "No orphaned tables found"
#. module: database_cleanup
#: model_terms:ir.ui.view,arch_db:database_cleanup.form_purge_wizard
msgid "Nothing found to clean up."
msgstr ""
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_property__purge_line_ids
#, fuzzy
#| msgid "Models to purge"
msgid "Properties to purge"
msgstr "Models to purge"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_property__property_id
msgid "Property"
msgstr ""
#. module: database_cleanup
#: model:ir.actions.server,name:database_cleanup.action_purge_column_line
#: model:ir.actions.server,name:database_cleanup.action_purge_data_line
#: model:ir.actions.server,name:database_cleanup.action_purge_menu_line
#: model:ir.actions.server,name:database_cleanup.action_purge_model_line
#: model:ir.actions.server,name:database_cleanup.action_purge_module_line
#: model:ir.actions.server,name:database_cleanup.action_purge_property_line
#: model:ir.actions.server,name:database_cleanup.action_purge_table_line
#: model_terms:ir.ui.view,arch_db:database_cleanup.form_purge_wizard
msgid "Purge"
msgstr "Purge"
#. module: database_cleanup
#: model:ir.model,name:database_cleanup.model_cleanup_purge_line
msgid "Purge Column Abstract Wizard"
msgstr ""
#. module: database_cleanup
#: model:ir.model,name:database_cleanup.model_cleanup_purge_line_column
msgid "Purge Column Wizard Lines"
msgstr ""
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_wizard__purge_line_ids
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard__purge_line_ids
#, fuzzy
#| msgid "Purge menus"
msgid "Purge Line"
msgstr "Purge menus"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_column__wizard_id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_data__wizard_id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_menu__wizard_id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_model__wizard_id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_module__wizard_id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_property__wizard_id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_table__wizard_id
msgid "Purge Wizard"
msgstr "Purge Wizard"
#. module: database_cleanup
#: model_terms:ir.ui.view,arch_db:database_cleanup.form_purge_wizard
msgid "Purge all"
msgstr "Purge all"
#. module: database_cleanup
#: model:ir.actions.server,name:database_cleanup.action_purge_columns
#: model:ir.model,name:database_cleanup.model_cleanup_purge_wizard_column
msgid "Purge columns"
msgstr "Purge columns"
#. module: database_cleanup
#: model:ir.model,name:database_cleanup.model_cleanup_purge_wizard_data
msgid "Purge data"
msgstr "Purge data"
#. module: database_cleanup
#: model:ir.actions.server,name:database_cleanup.action_purge_data
msgid "Purge data entries that refer to missing resources"
msgstr "Purge data entries that refer to missing resources"
#. module: database_cleanup
#: model:ir.actions.server,name:database_cleanup.action_purge_menus
#: model:ir.model,name:database_cleanup.model_cleanup_purge_wizard_menu
msgid "Purge menus"
msgstr "Purge menus"
#. module: database_cleanup
#: model:ir.actions.server,name:database_cleanup.action_purge_models
#: model:ir.model,name:database_cleanup.model_cleanup_purge_line_model
#: model:ir.model,name:database_cleanup.model_cleanup_purge_wizard_model
#: model_terms:ir.ui.view,arch_db:database_cleanup.tree_purge_line
msgid "Purge models"
msgstr "Purge models"
#. module: database_cleanup
#: model:ir.actions.server,name:database_cleanup.action_purge_modules
#: model:ir.model,name:database_cleanup.model_cleanup_purge_wizard_module
msgid "Purge modules"
msgstr "Purge modules"
#. module: database_cleanup
#: model:ir.ui.menu,name:database_cleanup.menu_purge_columns
msgid "Purge obsolete columns"
msgstr "Purge obsolete columns"
#. module: database_cleanup
#: model:ir.ui.menu,name:database_cleanup.menu_purge_data
msgid "Purge obsolete data entries"
msgstr "Purge obsolete data entries"
#. module: database_cleanup
#: model:ir.ui.menu,name:database_cleanup.menu_purge_menus
msgid "Purge obsolete menu entries"
msgstr "Purge obsolete menu entries"
#. module: database_cleanup
#: model:ir.ui.menu,name:database_cleanup.menu_purge_models
msgid "Purge obsolete models"
msgstr "Purge obsolete models"
#. module: database_cleanup
#: model:ir.ui.menu,name:database_cleanup.menu_purge_modules
msgid "Purge obsolete modules"
msgstr "Purge obsolete modules"
#. module: database_cleanup
#: model:ir.ui.menu,name:database_cleanup.menu_purge_property
#, fuzzy
#| msgid "Purge obsolete models"
msgid "Purge obsolete properties"
msgstr "Purge obsolete properties"
#. module: database_cleanup
#: model:ir.ui.menu,name:database_cleanup.menu_purge_tables
msgid "Purge obsolete tables"
msgstr "Purge obsolete tables"
#. module: database_cleanup
#: model:ir.actions.server,name:database_cleanup.action_purge_property
#: model:ir.model,name:database_cleanup.model_cleanup_purge_line_property
#: model:ir.model,name:database_cleanup.model_cleanup_purge_wizard_property
#, fuzzy
#| msgid "Purge models"
msgid "Purge properties"
msgstr "Purge models"
#. module: database_cleanup
#: model:ir.model,name:database_cleanup.model_cleanup_purge_wizard
msgid "Purge stuff"
msgstr "Purge stuff"
#. module: database_cleanup
#: model:ir.actions.server,name:database_cleanup.action_purge_tables
#: model:ir.model,name:database_cleanup.model_cleanup_purge_wizard_table
msgid "Purge tables"
msgstr "Purge tables"
#. module: database_cleanup
#: model:ir.model,name:database_cleanup.model_cleanup_purge_line_table
msgid "Purge tables wizard lines"
msgstr ""
#. module: database_cleanup
#: model_terms:ir.ui.view,arch_db:database_cleanup.tree_purge_line
msgid "Purge this model"
msgstr "Purge this model"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line__purged
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_column__purged
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_data__purged
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_menu__purged
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_model__purged
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_module__purged
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_property__purged
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_table__purged
msgid "Purged"
msgstr "Purged"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line_property__reason
msgid "Reason"
msgstr ""
#. module: database_cleanup
#: selection:cleanup.purge.line.property,reason:0
msgid "Same value as default"
msgstr ""
#. module: database_cleanup
#: model_terms:ir.ui.view,arch_db:database_cleanup.form_purge_wizard
msgid "Select lines"
msgstr "Select lines"
#. module: database_cleanup
#: code:addons/database_cleanup/models/purge_wizard.py:75
#, python-format
msgid "Select lines to purge"
msgstr "Select lines to purge"
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_wizard_table__purge_line_ids
msgid "Tables to purge"
msgstr "Tables to purge"
#. module: database_cleanup
#: selection:cleanup.purge.line.property,reason:0
msgid "Unknown model"
msgstr ""
#. module: database_cleanup
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_create_indexes_line__wizard_id
#: model:ir.model.fields,field_description:database_cleanup.field_cleanup_purge_line__wizard_id
#, fuzzy
#| msgid "Purge Wizard"
msgid "Wizard"
msgstr "Purge Wizard"
#. module: database_cleanup
#: model:ir.model,name:database_cleanup.model_cleanup_create_indexes_line
#, fuzzy
#| msgid "cleanup.purge.line.module"
msgid "cleanup.create_indexes.line"
msgstr "cleanup.purge.line.module"
#. module: database_cleanup
#: model:ir.model,name:database_cleanup.model_cleanup_purge_line_data
msgid "cleanup.purge.line.data"
msgstr "cleanup.purge.line.data"
#. module: database_cleanup
#: model:ir.model,name:database_cleanup.model_cleanup_purge_line_menu
msgid "cleanup.purge.line.menu"
msgstr "cleanup.purge.line.menu"
#. module: database_cleanup
#: model:ir.model,name:database_cleanup.model_cleanup_purge_line_module
msgid "cleanup.purge.line.module"
msgstr "cleanup.purge.line.module"

View File

@ -2,25 +2,29 @@
# Copyright 2021 Camptocamp <https://camptocamp.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
import logging
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from odoo.addons.base.models.ir_model import MODULE_UNINSTALL_FLAG
_logger = logging.getLogger(__name__)
class IrModel(models.Model):
_inherit = "ir.model"
def _drop_table(self):
"""this function crashes for undefined models"""
existing_model_ids = self.filtered(lambda x: x.model in self.env)
return super(IrModel, existing_model_ids)._drop_table()
self = self.filtered(lambda x: x.model in self.env)
return super()._drop_table()
@api.depends()
def _inherited_models(self):
"""this function crashes for undefined models"""
existing_model_ids = self.filtered(lambda x: x.model in self.env)
super(IrModel, existing_model_ids)._inherited_models()
self = self.filtered(lambda x: x.model in self.env)
return super()._inherited_models()
class IrModelFields(models.Model):
@ -28,8 +32,8 @@ class IrModelFields(models.Model):
def _prepare_update(self):
"""this function crashes for undefined models"""
existing = self.filtered(lambda x: x.model in self.env)
return super(IrModelFields, existing)._prepare_update()
self = self.filtered(lambda x: x.model in self.env)
return super()._prepare_update()
class CleanupPurgeLineModel(models.TransientModel):
@ -92,9 +96,9 @@ class CleanupPurgeLineModel(models.TransientModel):
# cannot be instantiated
relation.unlink()
except KeyError:
pass
_logger.error("")
except AttributeError:
pass
_logger.error("")
self.env["ir.model.relation"].search(
[("model", "=", line.name)]
).with_context(**context_flags).unlink()

View File

@ -28,7 +28,7 @@ class IrModelData(models.Model):
continue
if this.model not in self.env:
this.unlink()
return super(IrModelData, self)._module_data_uninstall(modules_to_remove)
return super()._module_data_uninstall(modules_to_remove)
class CleanupPurgeLineModule(models.TransientModel):
@ -53,7 +53,7 @@ class CleanupPurgeLineModule(models.TransientModel):
modules.filtered(
lambda x: x.state not in ("uninstallable", "uninstalled")
).button_immediate_uninstall()
modules.refresh()
modules.env.invalidate_all()
modules.unlink()
return self.write({"purged": True})

View File

@ -16,8 +16,8 @@ class CleanupPurgeLine(models.AbstractModel):
_order = "name"
_description = "Purge Column Abstract Wizard"
name = fields.Char("Name", readonly=True)
purged = fields.Boolean("Purged", readonly=True)
name = fields.Char(readonly=True)
purged = fields.Boolean(readonly=True)
wizard_id = fields.Many2one("cleanup.purge.wizard")
logger = logging.getLogger("odoo.addons.database_cleanup")
@ -30,7 +30,7 @@ class CleanupPurgeLine(models.AbstractModel):
# make sure the user trying this is actually supposed to do it
if self.env.ref("base.group_erp_manager") not in self.env.user.groups_id:
raise AccessDenied
return super(CleanupPurgeLine, self).create(values)
return super().create(values)
class PurgeWizard(models.AbstractModel):
@ -41,7 +41,7 @@ class PurgeWizard(models.AbstractModel):
@api.model
def default_get(self, fields_list):
res = super(PurgeWizard, self).default_get(fields_list)
res = super().default_get(fields_list)
if "purge_line_ids" in fields_list:
res["purge_line_ids"] = self.find()
return res
@ -85,6 +85,6 @@ class PurgeWizard(models.AbstractModel):
# make sure the user trying this is actually supposed to do it
if self.env.ref("base.group_erp_manager") not in self.env.user.groups_id:
raise AccessDenied
return super(PurgeWizard, self).create(values)
return super().create(values)
purge_line_ids = fields.One2many("cleanup.purge.line", "wizard_id")

View File

@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.modules.registry import Registry
from odoo.tests import TransactionCase
from odoo.tests.common import TransactionCase
class Common(TransactionCase):

View File

@ -42,7 +42,7 @@
<record id="tree_purge_line" model="ir.ui.view">
<field name="model">cleanup.purge.line</field>
<field name="arch" type="xml">
<tree string="Purge models" delete="false" create="false">
<tree delete="false" create="false">
<field name="name" />
<field name="purged" />
<button

View File

@ -0,0 +1 @@
../../../../database_cleanup

View File

@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)