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.

41 lines
1.7 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record model="ir.actions.act_window"
  4. id="action_mrp_repair_agreement_specific">
  5. <field name="name">Repair Orders</field>
  6. <field name="type">ir.actions.act_window</field>
  7. <field name="res_model">mrp.repair</field>
  8. <field name="view_type">form</field>
  9. <field name="view_mode">tree,form</field>
  10. <field name="domain">[('agreement_id', '=', active_id)]</field>
  11. <field name="help" type="html">
  12. <p class="oe_view_nocontent_create">
  13. Create Repair Orders
  14. </p>
  15. </field>
  16. </record>
  17. <record id="partner_agreement_form_view_repair" model="ir.ui.view">
  18. <field name="name">agreement.form.repair</field>
  19. <field name="model">agreement</field>
  20. <field name="inherit_id" ref="agreement.partner_agreement_form_view"/>
  21. <field name="arch" type="xml">
  22. <xpath expr="//div[@name='button_box']" position="inside">
  23. <button name="%(action_mrp_repair_agreement_specific)d"
  24. type="action"
  25. attrs="{'invisible': [('repair_count', '=', 0)]}"
  26. class="oe_stat_button" icon="fa-wrench">
  27. <div class="o_field_widget o_stat_info">
  28. <span class="o_stat_value">
  29. <field name="repair_count" widget="statinfo"
  30. nolabel="1"/>
  31. </span>
  32. <span class="o_stat_text">Repair Orders</span>
  33. </div>
  34. </button>
  35. </xpath>
  36. </field>
  37. </record>
  38. </odoo>