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.

64 lines
2.5 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (c) 2017-2019 MuK IT GmbH.
  4. This file is part of MuK Web Refresh
  5. (see https://mukit.at).
  6. This program is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU Affero General Public License as
  8. published by the Free Software Foundation, either version 3 of the
  9. License, or (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU Affero General Public License for more details.
  14. You should have received a copy of the GNU Affero General Public License
  15. along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. -->
  17. <odoo>
  18. <record id="view_client_refresh_automation_form" model="ir.ui.view">
  19. <field name="name">base.automation.form</field>
  20. <field name="model">base.automation</field>
  21. <field name="mode">primary</field>
  22. <field name="inherit_id" ref="base_automation.view_base_automation_form"/>
  23. <field name="arch" type="xml">
  24. <xpath expr="//field[@name='name']" position="attributes">
  25. <attribute name="placeholder">e.g. Refresh Users on Create</attribute>
  26. </xpath>
  27. <xpath expr="//field[@name='state']" position="attributes">
  28. <attribute name="invisible">1</attribute>
  29. </xpath>
  30. </field>
  31. </record>
  32. <record id="action_client_refresh_automation" model="ir.actions.act_window">
  33. <field name="name">Automated Refresh</field>
  34. <field name="res_model">base.automation</field>
  35. <field name="view_mode">tree,form</field>
  36. <field name="domain">[['state', '=', 'refresh']]</field>
  37. <field name="context">{'default_state': 'refresh'}</field>
  38. <field name="view_ids" eval="[(5, 0, 0),
  39. (0, 0, {'view_mode': 'tree', 'view_id': ref('base_automation.view_base_automation_tree')}),
  40. (0, 0, {'view_mode': 'form', 'view_id': ref('view_client_refresh_automation_form')})]"/>
  41. <field name="help" type="html">
  42. <p class="o_view_nocontent_smiling_face">
  43. Create a new Automated Refresh
  44. </p>
  45. <p>
  46. Automatically updates the views belonging to the model.
  47. </p>
  48. </field>
  49. </record>
  50. <menuitem id="menu_client_refresh_automation" name="Automated Refresh"
  51. parent="base.menu_automation" action="action_client_refresh_automation"/>
  52. </odoo>