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.6 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record model="ir.actions.act_window"
  4. id="action_project_task_agreement_specific">
  5. <field name="name">Tasks</field>
  6. <field name="type">ir.actions.act_window</field>
  7. <field name="res_model">project.task</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 Tasks
  14. </p>
  15. </field>
  16. </record>
  17. <record id="partner_agreement_form_view_task" model="ir.ui.view">
  18. <field name="name">agreement.form.task</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_project_task_agreement_specific)d"
  24. type="action"
  25. attrs="{'invisible': [('task_count', '=', 0)]}"
  26. class="oe_stat_button" icon="fa-tasks">
  27. <div class="o_field_widget o_stat_info">
  28. <span class="o_stat_value">
  29. <field name="task_count" widget="statinfo"
  30. nolabel="1"/>
  31. </span>
  32. <span class="o_stat_text">Tasks</span>
  33. </div>
  34. </button>
  35. </xpath>
  36. </field>
  37. </record>
  38. </odoo>