You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
3.1 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="purge_menus_view" model="ir.ui.view">
  5. <field name="name">Form view for purge menus wizard</field>
  6. <field name="model">cleanup.purge.wizard.menu</field>
  7. <field name="arch" type="xml">
  8. <form>
  9. <h1>
  10. <field name="name"/>
  11. </h1>
  12. <button type="object" name="purge_all" string="Purge all menus" />
  13. <button type="object" name="select_lines" string="Select lines" />
  14. <field name="purge_line_ids">
  15. <form>
  16. <group>
  17. <field name="name" />
  18. <field name="purged" invisible="0" />
  19. </group>
  20. <footer>
  21. <button type="object" name="purge"
  22. icon="gtk-cancel" string="Purge this menu"
  23. attrs="{'invisible': [('purged', '=', True)]}"/>
  24. </footer>
  25. </form>
  26. </field>
  27. </form>
  28. </field>
  29. </record>
  30. <record id="action_purge_menus" model="ir.actions.server">
  31. <field name="name">Purge menus</field>
  32. <field name="type">ir.actions.server</field>
  33. <field name="state">code</field>
  34. <field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_menu" />
  35. <field name="code">action = self.get_wizard_action(cr, uid, context=context)</field>
  36. </record>
  37. <record id="purge_menu_line_tree" model="ir.ui.view">
  38. <field name="model">cleanup.purge.line.menu</field>
  39. <field name="arch" type="xml">
  40. <tree>
  41. <field name="name" />
  42. <field name="purged" invisible="0" />
  43. <button type="object" name="purge"
  44. icon="gtk-cancel" string="Purge this model"
  45. attrs="{'invisible': [('purged', '=', True)]}"/>
  46. </tree>
  47. </field>
  48. </record>
  49. <record id="action_purge_menu_line" model="ir.actions.server">
  50. <field name="name">Purge</field>
  51. <field name="type">ir.actions.server</field>
  52. <field name="state">code</field>
  53. <field name="model_id" ref="database_cleanup.model_cleanup_purge_line_menu" />
  54. <field name="code">self.purge(cr, uid, context.get('active_ids', []), context)</field>
  55. </record>
  56. <record id="action_purge_menu_line_value" model="ir.values">
  57. <field name="name">Purge</field>
  58. <field name="key">action</field>
  59. <field name="key2">client_action_multi</field>
  60. <field name="model">cleanup.purge.line.menu</field>
  61. <field name="value" eval="'ir.actions.server,%d' % ref('database_cleanup.action_purge_menu_line')" />
  62. </record>
  63. </data>
  64. </openerp>