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.

42 lines
1.8 KiB

  1. <!-- # Copyright (C) 2018 Pavlov Media
  2. # Copyright (C) 2019 Open Source Integrators
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
  4. <odoo>
  5. <record model="ir.actions.act_window"
  6. id="action_maintenance_request_agreement_specific">
  7. <field name="name">Maintenance Requests</field>
  8. <field name="type">ir.actions.act_window</field>
  9. <field name="res_model">maintenance.request</field>
  10. <field name="view_type">form</field>
  11. <field name="view_mode">tree,form</field>
  12. <field name="domain">[('agreement_id', '=', active_id)]</field>
  13. <field name="help" type="html">
  14. <p class="oe_view_nocontent_create">
  15. Create Maintenance Requests
  16. </p>
  17. </field>
  18. </record>
  19. <record id="partner_agreement_form_view" model="ir.ui.view">
  20. <field name="name">agreement.form.maintenance.request</field>
  21. <field name="model">agreement</field>
  22. <field name="inherit_id" ref="agreement_legal.partner_agreement_form_view"/>
  23. <field name="arch" type="xml">
  24. <xpath expr="//div[@name='button_box']" position="inside">
  25. <button name="%(action_maintenance_request_agreement_specific)d"
  26. type="action"
  27. class="oe_stat_button" icon="fa-wrench">
  28. <div class="o_field_widget o_stat_info">
  29. <span class="o_stat_value">
  30. <field name="mr_count" widget="statinfo"
  31. nolabel="1"/>
  32. </span>
  33. <span class="o_stat_text">Maintenance Requests</span>
  34. </div>
  35. </button>
  36. </xpath>
  37. </field>
  38. </record>
  39. </odoo>