|
|
@ -11,15 +11,20 @@ |
|
|
|
<field name="name"/> |
|
|
|
</h1> |
|
|
|
<button type="object" name="purge_all" string="Purge all columns" /> |
|
|
|
<button type="object" name="select_lines" string="Select lines" /> |
|
|
|
<field name="purge_line_ids" colspan="4" nolabel="1"> |
|
|
|
<tree string="Purge columns"> |
|
|
|
<field name="name" /> |
|
|
|
<field name="model_id" /> |
|
|
|
<field name="purged" invisible="0" /> |
|
|
|
<button type="object" name="purge" |
|
|
|
icon="gtk-cancel" string="Purge this column" |
|
|
|
attrs="{'invisible': [('purged', '=', True)]}"/> |
|
|
|
</tree> |
|
|
|
<form string="Purge columns"> |
|
|
|
<group> |
|
|
|
<field name="name" /> |
|
|
|
<field name="model_id" /> |
|
|
|
<field name="purged" invisible="0" /> |
|
|
|
</group> |
|
|
|
<footer> |
|
|
|
<button type="object" name="purge" |
|
|
|
icon="gtk-cancel" string="Purge this column" |
|
|
|
attrs="{'invisible': [('purged', '=', True)]}"/> |
|
|
|
</footer> |
|
|
|
</form> |
|
|
|
</field> |
|
|
|
</form> |
|
|
|
</field> |
|
|
@ -30,20 +35,37 @@ |
|
|
|
<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"> |
|
|
|
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, |
|
|
|
}, |
|
|
|
} |
|
|
|
<field name="code">action = self.get_wizard_action(cr, uid, context=context)</field> |
|
|
|
</record> |
|
|
|
|
|
|
|
<record id="purge_column_line_tree" model="ir.ui.view"> |
|
|
|
<field name="model">cleanup.purge.line.column</field> |
|
|
|
<field name="arch" type="xml"> |
|
|
|
<tree string="Purge columns"> |
|
|
|
<field name="name" /> |
|
|
|
<field name="model_id" /> |
|
|
|
<field name="purged" invisible="0" /> |
|
|
|
<button type="object" name="purge" |
|
|
|
icon="gtk-cancel" string="Purge this column" |
|
|
|
attrs="{'invisible': [('purged', '=', True)]}"/> |
|
|
|
</tree> |
|
|
|
</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_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> |