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.

49 lines
1.9 KiB

8 years ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- Module Search View -->
  4. <record id="module_view_search" model="ir.ui.view">
  5. <field name="name">updates.module.search</field>
  6. <field name="model">ir.module.module</field>
  7. <field name="inherit_id" ref="base.view_module_filter"/>
  8. <field name="arch" type="xml">
  9. <field name="category_id" position="after">
  10. <filter name="scheduled_upgrades" string="Scheduled Upgrades" domain="[('state', '=', 'to upgrade')]"/>
  11. </field>
  12. </field>
  13. </record>
  14. <!--Open Updates Action (updates apps list first)-->
  15. <record id="module_action_open_updates" model="ir.actions.server">
  16. <field name="name">Open Updates and Update Apps List Server Action</field>
  17. <field name="model_id" ref="model_ir_module_module"/>
  18. <field name="code">
  19. if model.update_list():
  20. action = {
  21. 'name': 'Updates',
  22. 'type': 'ir.actions.act_window',
  23. 'res_model': 'ir.module.module',
  24. 'view_type': 'form',
  25. 'view_mode': 'tree,form',
  26. 'target': 'main',
  27. 'context': '{"search_default_scheduled_upgrades": 1}',
  28. }
  29. </field>
  30. </record>
  31. <!--Apps / Updates menu item-->
  32. <menuitem
  33. name="Updates"
  34. action="module_action_open_updates"
  35. id="module_menu_updates"
  36. groups="base.group_no_one"
  37. parent="base.menu_management"
  38. sequence="20"/>
  39. <!-- Menu in Settings > Technical for standard Updates link -->
  40. <menuitem parent="base.menu_custom" sequence="27" name="Modules" id="menu_default_modules"/>
  41. <!-- Moved standard Updates link -->
  42. <record model="ir.ui.menu" id="base.menu_module_updates">
  43. <field name="parent_id" ref="menu_default_modules"/>
  44. </record>
  45. </odoo>