Browse Source
[MIG] database_cleanup: Migration to version 10.0
[MIG] database_cleanup: Migration to version 10.0
Using new base model inheritance.pull/1009/head
Eric Antones
7 years ago
committed by
Holger Brunn
No known key found for this signature in database
GPG Key ID: 1C9760FECA3AE18
44 changed files with 581 additions and 613 deletions
-
8database_cleanup/README.rst
-
4database_cleanup/__manifest__.py
-
2database_cleanup/i18n/am.po
-
147database_cleanup/i18n/ca.po
-
2database_cleanup/i18n/database_cleanup.pot
-
2database_cleanup/i18n/de.po
-
2database_cleanup/i18n/el_GR.po
-
2database_cleanup/i18n/es.po
-
2database_cleanup/i18n/es_ES.po
-
2database_cleanup/i18n/fi.po
-
2database_cleanup/i18n/fr.po
-
2database_cleanup/i18n/fr_CA.po
-
2database_cleanup/i18n/gl.po
-
2database_cleanup/i18n/hr.po
-
2database_cleanup/i18n/hr_HR.po
-
2database_cleanup/i18n/it.po
-
2database_cleanup/i18n/nl.po
-
2database_cleanup/i18n/pt.po
-
2database_cleanup/i18n/pt_BR.po
-
2database_cleanup/i18n/pt_PT.po
-
2database_cleanup/i18n/ru.po
-
2database_cleanup/i18n/sl.po
-
2database_cleanup/i18n/tr.po
-
2database_cleanup/i18n/zh_CN.po
-
8database_cleanup/models/create_indexes.py
-
19database_cleanup/models/purge_columns.py
-
13database_cleanup/models/purge_data.py
-
16database_cleanup/models/purge_menus.py
-
49database_cleanup/models/purge_models.py
-
19database_cleanup/models/purge_modules.py
-
6database_cleanup/models/purge_properties.py
-
22database_cleanup/models/purge_tables.py
-
6database_cleanup/models/purge_wizard.py
-
32database_cleanup/tests/test_database_cleanup.py
-
4database_cleanup/views/create_indexes.xml
-
118database_cleanup/views/menu.xml
-
88database_cleanup/views/purge_columns.xml
-
88database_cleanup/views/purge_data.xml
-
85database_cleanup/views/purge_menus.xml
-
85database_cleanup/views/purge_models.xml
-
85database_cleanup/views/purge_modules.xml
-
82database_cleanup/views/purge_properties.xml
-
84database_cleanup/views/purge_tables.xml
-
84database_cleanup/views/purge_wizard.xml
@ -1,70 +1,66 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
<odoo> |
|||
<record model="ir.ui.menu" id="menu_database_cleanup"> |
|||
<field name="name">Database cleanup</field> |
|||
<field name="sequence" eval="10" /> |
|||
<!-- attach to Settings -> Technical --> |
|||
<field name="parent_id" ref="base.menu_custom"/> |
|||
<field name="groups_id" eval="[(6,0, [ref('base.group_erp_manager')])]"/> |
|||
</record> |
|||
|
|||
<record model="ir.ui.menu" id="menu_database_cleanup"> |
|||
<field name="name">Database cleanup</field> |
|||
<field name="sequence" eval="10" /> |
|||
<!-- attach to Settings -> Technical --> |
|||
<field name="parent_id" ref="base.menu_custom"/> |
|||
<field name="groups_id" eval="[(6,0, [ref('base.group_erp_manager')])]"/> |
|||
</record> |
|||
<record model="ir.ui.menu" id="menu_purge_modules"> |
|||
<field name="name">Purge obsolete modules</field> |
|||
<field name="sequence" eval="10" /> |
|||
<field name="action" ref="action_purge_modules" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
|
|||
<record model="ir.ui.menu" id="menu_purge_modules"> |
|||
<field name="name">Purge obsolete modules</field> |
|||
<field name="sequence" eval="10" /> |
|||
<field name="action" ref="action_purge_modules" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
<record model="ir.ui.menu" id="menu_purge_models"> |
|||
<field name="name">Purge obsolete models</field> |
|||
<field name="sequence" eval="20" /> |
|||
<field name="action" ref="action_purge_models" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
|
|||
<record model="ir.ui.menu" id="menu_purge_models"> |
|||
<field name="name">Purge obsolete models</field> |
|||
<field name="sequence" eval="20" /> |
|||
<field name="action" ref="action_purge_models" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
<record model="ir.ui.menu" id="menu_purge_columns"> |
|||
<field name="name">Purge obsolete columns</field> |
|||
<field name="sequence" eval="30" /> |
|||
<field name="action" ref="action_purge_columns" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
|
|||
<record model="ir.ui.menu" id="menu_purge_columns"> |
|||
<field name="name">Purge obsolete columns</field> |
|||
<field name="sequence" eval="30" /> |
|||
<field name="action" ref="action_purge_columns" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
<record model="ir.ui.menu" id="menu_purge_tables"> |
|||
<field name="name">Purge obsolete tables</field> |
|||
<field name="sequence" eval="40" /> |
|||
<field name="action" ref="action_purge_tables" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
|
|||
<record model="ir.ui.menu" id="menu_purge_tables"> |
|||
<field name="name">Purge obsolete tables</field> |
|||
<field name="sequence" eval="40" /> |
|||
<field name="action" ref="action_purge_tables" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
<record model="ir.ui.menu" id="menu_purge_data"> |
|||
<field name="name">Purge obsolete data entries</field> |
|||
<field name="sequence" eval="50" /> |
|||
<field name="action" ref="action_purge_data" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
|
|||
<record model="ir.ui.menu" id="menu_purge_data"> |
|||
<field name="name">Purge obsolete data entries</field> |
|||
<field name="sequence" eval="50" /> |
|||
<field name="action" ref="action_purge_data" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
<record model="ir.ui.menu" id="menu_purge_menus"> |
|||
<field name="name">Purge obsolete menu entries</field> |
|||
<field name="sequence" eval="60" /> |
|||
<field name="action" ref="action_purge_menus" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
|
|||
<record model="ir.ui.menu" id="menu_purge_menus"> |
|||
<field name="name">Purge obsolete menu entries</field> |
|||
<field name="sequence" eval="60" /> |
|||
<field name="action" ref="action_purge_menus" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
<record model="ir.ui.menu" id="menu_create_indexes"> |
|||
<field name="name">Create missing indexes</field> |
|||
<field name="sequence" eval="70" /> |
|||
<field name="action" ref="cleanup_create_indexes_wizard_action" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
|
|||
<record model="ir.ui.menu" id="menu_create_indexes"> |
|||
<field name="name">Create missing indexes</field> |
|||
<field name="sequence" eval="70" /> |
|||
<field name="action" ref="cleanup_create_indexes_wizard_action" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
|
|||
<record model="ir.ui.menu" id="menu_purge_property"> |
|||
<field name="name">Purge obsolete properties</field> |
|||
<field name="sequence" eval="80" /> |
|||
<field name="action" ref="action_purge_property" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
|||
<record model="ir.ui.menu" id="menu_purge_property"> |
|||
<field name="name">Purge obsolete properties</field> |
|||
<field name="sequence" eval="80" /> |
|||
<field name="action" ref="action_purge_property" /> |
|||
<field name="parent_id" ref="menu_database_cleanup"/> |
|||
</record> |
|||
</odoo> |
@ -1,50 +1,52 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
<record id="purge_columns_view" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard.column</field> |
|||
<field name="inherit_id" ref="form_purge_wizard" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<field name="name" position="after"> |
|||
<field name="model_id" /> |
|||
</field> |
|||
<odoo> |
|||
<record id="purge_columns_view" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard.column</field> |
|||
<field name="inherit_id" ref="form_purge_wizard" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<field name="name" position="after"> |
|||
<field name="model_id" /> |
|||
</field> |
|||
</record> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_columns" model="ir.actions.server"> |
|||
<field name="name">Purge columns</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_column" /> |
|||
<field name="code">action = self.get_wizard_action(cr, uid, context=context)</field> |
|||
</record> |
|||
<record id="action_purge_columns" model="ir.actions.server"> |
|||
<field name="name">Purge columns</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_column" /> |
|||
<field name="code"> |
|||
action = env.get('cleanup.purge.wizard.column').get_wizard_action() |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="purge_column_line_tree" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.line.column</field> |
|||
<field name="inherit_id" ref="tree_purge_line" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<field name="name" position="after"> |
|||
<field name="model_id" /> |
|||
</field> |
|||
<record id="purge_column_line_tree" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.line.column</field> |
|||
<field name="inherit_id" ref="tree_purge_line" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<field name="name" position="after"> |
|||
<field name="model_id" /> |
|||
</field> |
|||
</record> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_column_line" model="ir.actions.server"> |
|||
<field name="name">Purge</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_line_column" /> |
|||
<field name="code">self.purge(cr, uid, context.get('active_ids', []), context)</field> |
|||
</record> |
|||
<record id="action_purge_column_line" model="ir.actions.server"> |
|||
<field name="name">Purge</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_line_column" /> |
|||
<field name="code"> |
|||
env.get('cleanup.purge.line.column').purge() |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_column_line_value" model="ir.values"> |
|||
<field name="name">Purge</field> |
|||
<field name="key">action</field> |
|||
<field name="key2">client_action_multi</field> |
|||
<field name="model">cleanup.purge.line.column</field> |
|||
<field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_column_line')" /> |
|||
</record> |
|||
</data> |
|||
</openerp> |
|||
<record id="action_purge_column_line_value" model="ir.values"> |
|||
<field name="name">Purge</field> |
|||
<field name="key">action</field> |
|||
<field name="key2">client_action_multi</field> |
|||
<field name="model">cleanup.purge.line.column</field> |
|||
<field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_column_line')" /> |
|||
</record> |
|||
</odoo> |
@ -1,50 +1,52 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
<record id="purge_data_view" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard.data</field> |
|||
<field name="inherit_id" ref="form_purge_wizard" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<field name="name" position="after"> |
|||
<field name="data_id" /> |
|||
</field> |
|||
<odoo> |
|||
<record id="purge_data_view" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard.data</field> |
|||
<field name="inherit_id" ref="form_purge_wizard" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<field name="name" position="after"> |
|||
<field name="data_id" /> |
|||
</field> |
|||
</record> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_data" model="ir.actions.server"> |
|||
<field name="name">Purge data entries that refer to missing resources</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_data" /> |
|||
<field name="code">action = self.get_wizard_action(cr, uid, context=context)</field> |
|||
</record> |
|||
<record id="action_purge_data" model="ir.actions.server"> |
|||
<field name="name">Purge data entries that refer to missing resources</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_data" /> |
|||
<field name="code"> |
|||
action = env.get('cleanup.purge.wizard.data').get_wizard_action() |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="purge_data_line_tree" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.line.data</field> |
|||
<field name="inherit_id" ref="tree_purge_line" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<field name="name" position="after"> |
|||
<field name="data_id" /> |
|||
</field> |
|||
<record id="purge_data_line_tree" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.line.data</field> |
|||
<field name="inherit_id" ref="tree_purge_line" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<field name="name" position="after"> |
|||
<field name="data_id" /> |
|||
</field> |
|||
</record> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_data_line" model="ir.actions.server"> |
|||
<field name="name">Purge</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_line_data" /> |
|||
<field name="code">self.purge(cr, uid, context.get('active_ids', []), context)</field> |
|||
</record> |
|||
<record id="action_purge_data_line" model="ir.actions.server"> |
|||
<field name="name">Purge</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_line_data" /> |
|||
<field name="code"> |
|||
env.get('cleanup.purge.line.data').purge() |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_data_line_value" model="ir.values"> |
|||
<field name="name">Purge</field> |
|||
<field name="key">action</field> |
|||
<field name="key2">client_action_multi</field> |
|||
<field name="model">cleanup.purge.line.data</field> |
|||
<field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_data_line')" /> |
|||
</record> |
|||
</data> |
|||
</openerp> |
|||
<record id="action_purge_data_line_value" model="ir.values"> |
|||
<field name="name">Purge</field> |
|||
<field name="key">action</field> |
|||
<field name="key2">client_action_multi</field> |
|||
<field name="model">cleanup.purge.line.data</field> |
|||
<field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_data_line')" /> |
|||
</record> |
|||
</odoo> |
@ -1,47 +1,48 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
<record id="purge_menus_view" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard.menu</field> |
|||
<field name="inherit_id" ref="form_purge_wizard" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data/> |
|||
</field> |
|||
</record> |
|||
<odoo> |
|||
<record id="purge_menus_view" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard.menu</field> |
|||
<field name="inherit_id" ref="form_purge_wizard" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data/> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_menus" model="ir.actions.server"> |
|||
<field name="name">Purge menus</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_menu" /> |
|||
<field name="code">action = self.get_wizard_action(cr, uid, context=context)</field> |
|||
</record> |
|||
<record id="action_purge_menus" model="ir.actions.server"> |
|||
<field name="name">Purge menus</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_menu" /> |
|||
<field name="code"> |
|||
action = env.get('cleanup.purge.wizard.menu').get_wizard_action() |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="purge_menu_line_tree" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.line.menu</field> |
|||
<field name="inherit_id" ref="tree_purge_line" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data /> |
|||
</field> |
|||
</record> |
|||
<record id="purge_menu_line_tree" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.line.menu</field> |
|||
<field name="inherit_id" ref="tree_purge_line" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data /> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_menu_line" model="ir.actions.server"> |
|||
<field name="name">Purge</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_line_menu" /> |
|||
<field name="code">self.purge(cr, uid, context.get('active_ids', []), context)</field> |
|||
</record> |
|||
<record id="action_purge_menu_line" model="ir.actions.server"> |
|||
<field name="name">Purge</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_line_menu" /> |
|||
<field name="code"> |
|||
env.get('cleanup.purge.line.menu').purge() |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_menu_line_value" model="ir.values"> |
|||
<field name="name">Purge</field> |
|||
<field name="key">action</field> |
|||
<field name="key2">client_action_multi</field> |
|||
<field name="model">cleanup.purge.line.menu</field> |
|||
<field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_menu_line')" /> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
|||
<record id="action_purge_menu_line_value" model="ir.values"> |
|||
<field name="name">Purge</field> |
|||
<field name="key">action</field> |
|||
<field name="key2">client_action_multi</field> |
|||
<field name="model">cleanup.purge.line.menu</field> |
|||
<field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_menu_line')" /> |
|||
</record> |
|||
</odoo> |
@ -1,47 +1,48 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
<record id="purge_models_view" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard.model</field> |
|||
<field name="inherit_id" ref="form_purge_wizard" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data /> |
|||
</field> |
|||
</record> |
|||
<odoo> |
|||
<record id="purge_models_view" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard.model</field> |
|||
<field name="inherit_id" ref="form_purge_wizard" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data /> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_models" model="ir.actions.server"> |
|||
<field name="name">Purge models</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_model" /> |
|||
<field name="code">action = self.get_wizard_action(cr, uid, context=context)</field> |
|||
</record> |
|||
<record id="action_purge_models" model="ir.actions.server"> |
|||
<field name="name">Purge models</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_model" /> |
|||
<field name="code"> |
|||
action = env.get('cleanup.purge.wizard.model').get_wizard_action() |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="purge_model_line_tree" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.line.model</field> |
|||
<field name="inherit_id" ref="tree_purge_line" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data /> |
|||
</field> |
|||
</record> |
|||
<record id="purge_model_line_tree" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.line.model</field> |
|||
<field name="inherit_id" ref="tree_purge_line" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data /> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_model_line" model="ir.actions.server"> |
|||
<field name="name">Purge</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_line_model" /> |
|||
<field name="code">self.purge(cr, uid, context.get('active_ids', []), context)</field> |
|||
</record> |
|||
<record id="action_purge_model_line" model="ir.actions.server"> |
|||
<field name="name">Purge</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_line_model" /> |
|||
<field name="code"> |
|||
env.get('cleanup.purge.line.model').purge() |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_model_line_value" model="ir.values"> |
|||
<field name="name">Purge</field> |
|||
<field name="key">action</field> |
|||
<field name="key2">client_action_multi</field> |
|||
<field name="model">cleanup.purge.line.model</field> |
|||
<field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_model_line')" /> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
|||
<record id="action_purge_model_line_value" model="ir.values"> |
|||
<field name="name">Purge</field> |
|||
<field name="key">action</field> |
|||
<field name="key2">client_action_multi</field> |
|||
<field name="model">cleanup.purge.line.model</field> |
|||
<field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_model_line')" /> |
|||
</record> |
|||
</odoo> |
@ -1,47 +1,48 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
<record id="purge_modules_view" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard.module</field> |
|||
<field name="inherit_id" ref="form_purge_wizard" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data /> |
|||
</field> |
|||
</record> |
|||
<odoo> |
|||
<record id="purge_modules_view" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard.module</field> |
|||
<field name="inherit_id" ref="form_purge_wizard" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data /> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_modules" model="ir.actions.server"> |
|||
<field name="name">Purge modules</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_module" /> |
|||
<field name="code">action = self.get_wizard_action(cr, uid, context=context)</field> |
|||
</record> |
|||
<record id="action_purge_modules" model="ir.actions.server"> |
|||
<field name="name">Purge modules</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_module" /> |
|||
<field name="code"> |
|||
action = env.get('cleanup.purge.wizard.module').get_wizard_action() |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="purge_module_line_tree" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.line.module</field> |
|||
<field name="inherit_id" ref="tree_purge_line" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data/> |
|||
</field> |
|||
</record> |
|||
<record id="purge_module_line_tree" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.line.module</field> |
|||
<field name="inherit_id" ref="tree_purge_line" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data/> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_module_line" model="ir.actions.server"> |
|||
<field name="name">Purge</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_line_module" /> |
|||
<field name="code">self.purge(cr, uid, context.get('active_ids', []), context)</field> |
|||
</record> |
|||
<record id="action_purge_module_line" model="ir.actions.server"> |
|||
<field name="name">Purge</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_line_module" /> |
|||
<field name="code"> |
|||
env.get('cleanup.purge.line.module').purge() |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_module_line_value" model="ir.values"> |
|||
<field name="name">Purge</field> |
|||
<field name="key">action</field> |
|||
<field name="key2">client_action_multi</field> |
|||
<field name="model">cleanup.purge.line.module</field> |
|||
<field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_module_line')" /> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
|||
<record id="action_purge_module_line_value" model="ir.values"> |
|||
<field name="name">Purge</field> |
|||
<field name="key">action</field> |
|||
<field name="key2">client_action_multi</field> |
|||
<field name="model">cleanup.purge.line.module</field> |
|||
<field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_module_line')" /> |
|||
</record> |
|||
</odoo> |
@ -1,49 +1,47 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
<record id="purge_property_view" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard.property</field> |
|||
<field name="inherit_id" ref="form_purge_wizard" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data /> |
|||
</field> |
|||
</record> |
|||
<odoo> |
|||
<record id="purge_property_view" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard.property</field> |
|||
<field name="inherit_id" ref="form_purge_wizard" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data /> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_property" model="ir.actions.server"> |
|||
<field name="name">Purge properties</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_property" /> |
|||
<field name="code">action = self.get_wizard_action(cr, uid, context=context)</field> |
|||
</record> |
|||
<record id="action_purge_property" model="ir.actions.server"> |
|||
<field name="name">Purge properties</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_property" /> |
|||
<field name="code">action = env.get('cleanup.purge.wizard.property').get_wizard_action()</field> |
|||
</record> |
|||
|
|||
<record id="purge_property_line_tree" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.line.property</field> |
|||
<field name="inherit_id" ref="tree_purge_line" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<field name="name" position="after"> |
|||
<field name="reason" /> |
|||
</field> |
|||
<record id="purge_property_line_tree" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.line.property</field> |
|||
<field name="inherit_id" ref="tree_purge_line" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<field name="name" position="after"> |
|||
<field name="reason" /> |
|||
</field> |
|||
</record> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_property_line" model="ir.actions.server"> |
|||
<field name="name">Purge</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_line_property" /> |
|||
<field name="code">self.purge(cr, uid, context.get('active_ids', []), context)</field> |
|||
</record> |
|||
<record id="action_purge_property_line" model="ir.actions.server"> |
|||
<field name="name">Purge</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_line_property" /> |
|||
<field name="code">env.get('cleanup.purge.line.property').purge()</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_property_line_value" model="ir.values"> |
|||
<field name="name">Purge</field> |
|||
<field name="key">action</field> |
|||
<field name="key2">client_action_multi</field> |
|||
<field name="model">cleanup.purge.line.property</field> |
|||
<field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_property_line')" /> |
|||
</record> |
|||
<record id="action_purge_property_line_value" model="ir.values"> |
|||
<field name="name">Purge</field> |
|||
<field name="key">action</field> |
|||
<field name="key2">client_action_multi</field> |
|||
<field name="model">cleanup.purge.line.property</field> |
|||
<field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_property_line')" /> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
|||
</odoo> |
@ -1,46 +1,48 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
<record id="purge_tables_view" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard.table</field> |
|||
<field name="inherit_id" ref="form_purge_wizard" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data /> |
|||
</field> |
|||
</record> |
|||
<odoo> |
|||
<record id="purge_tables_view" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard.table</field> |
|||
<field name="inherit_id" ref="form_purge_wizard" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data /> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_tables" model="ir.actions.server"> |
|||
<field name="name">Purge tables</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_table" /> |
|||
<field name="code">action = self.get_wizard_action(cr, uid, context=context)</field> |
|||
</record> |
|||
<record id="action_purge_tables" model="ir.actions.server"> |
|||
<field name="name">Purge tables</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_table" /> |
|||
<field name="code"> |
|||
action = env.get('cleanup.purge.wizard.table').get_wizard_action() |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="purge_table_line_tree" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.line.table</field> |
|||
<field name="inherit_id" ref="tree_purge_line" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data /> |
|||
</field> |
|||
</record> |
|||
<record id="purge_table_line_tree" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.line.table</field> |
|||
<field name="inherit_id" ref="tree_purge_line" /> |
|||
<field name="mode">primary</field> |
|||
<field name="arch" type="xml"> |
|||
<data /> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_table_line" model="ir.actions.server"> |
|||
<field name="name">Purge</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_line_table" /> |
|||
<field name="code">self.purge(cr, uid, context.get('active_ids', []), context)</field> |
|||
</record> |
|||
<record id="action_purge_table_line" model="ir.actions.server"> |
|||
<field name="name">Purge</field> |
|||
<field name="type">ir.actions.server</field> |
|||
<field name="state">code</field> |
|||
<field name="model_id" ref="database_cleanup.model_cleanup_purge_line_table" /> |
|||
<field name="code"> |
|||
env.get('cleanup.purge.line.table').purge() |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_purge_table_line_value" model="ir.values"> |
|||
<field name="name">Purge</field> |
|||
<field name="key">action</field> |
|||
<field name="key2">client_action_multi</field> |
|||
<field name="model">cleanup.purge.line.table</field> |
|||
<field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_table_line')" /> |
|||
</record> |
|||
</data> |
|||
</openerp> |
|||
<record id="action_purge_table_line_value" model="ir.values"> |
|||
<field name="name">Purge</field> |
|||
<field name="key">action</field> |
|||
<field name="key2">client_action_multi</field> |
|||
<field name="model">cleanup.purge.line.table</field> |
|||
<field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_table_line')" /> |
|||
</record> |
|||
</odoo> |
@ -1,44 +1,42 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data> |
|||
<record id="form_purge_wizard" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard</field> |
|||
<field name="arch" type="xml"> |
|||
<form> |
|||
<header> |
|||
<button type="object" name="purge_all" string="Purge all" class="oe_highlight" /> |
|||
<button type="object" name="select_lines" string="Select lines" /> |
|||
</header> |
|||
<field name="purge_line_ids" attrs="{'invisible': [('purge_line_ids', '=', [])]}"> |
|||
<form> |
|||
<group> |
|||
<field name="name" /> |
|||
<field name="purged" /> |
|||
</group> |
|||
<footer> |
|||
<button type="object" name="purge" class="oe_highlight" |
|||
string="Purge" |
|||
attrs="{'invisible': [('purged', '=', True)]}"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
<div attrs="{'invisible': [('purge_line_ids', '!=', [])]}"> |
|||
Nothing found to clean up. |
|||
</div> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<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"> |
|||
<field name="name" /> |
|||
<field name="purged" /> |
|||
<button type="object" name="purge" |
|||
icon="gtk-cancel" string="Purge this model" |
|||
attrs="{'invisible': [('purged', '=', True)]}"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</openerp> |
|||
<odoo> |
|||
<record id="form_purge_wizard" model="ir.ui.view"> |
|||
<field name="model">cleanup.purge.wizard</field> |
|||
<field name="arch" type="xml"> |
|||
<form> |
|||
<header> |
|||
<button type="object" name="purge_all" string="Purge all" class="oe_highlight" /> |
|||
<button type="object" name="select_lines" string="Select lines" /> |
|||
</header> |
|||
<div attrs="{'invisible': [('purge_line_ids', '!=', [])]}"> |
|||
Nothing found to clean up. |
|||
</div> |
|||
<field name="purge_line_ids" attrs="{'invisible': [('purge_line_ids', '=', [])]}"> |
|||
<form> |
|||
<group> |
|||
<field name="name" /> |
|||
<field name="purged" /> |
|||
</group> |
|||
<footer> |
|||
<button type="object" name="purge" class="oe_highlight" |
|||
string="Purge" |
|||
attrs="{'invisible': [('purged', '=', True)]}"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<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"> |
|||
<field name="name" /> |
|||
<field name="purged" /> |
|||
<button type="object" name="purge" |
|||
icon="gtk-cancel" string="Purge this model" |
|||
attrs="{'invisible': [('purged', '=', True)]}"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue