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.

90 lines
3.3 KiB

  1. <?xml version="1.0"?>
  2. <!--
  3. © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
  4. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  5. -->
  6. <odoo>
  7. <record id="agreement_form" model="ir.ui.view">
  8. <field name="name">agreement.form</field>
  9. <field name="model">agreement</field>
  10. <field name="arch" type="xml">
  11. <form string="Agreement">
  12. <div class="oe_button_box" name="button_box">
  13. <button name="toggle_active" type="object"
  14. class="oe_stat_button" icon="fa-archive">
  15. <field name="active" widget="boolean_button"
  16. options='{"terminology": "archive"}'/>
  17. </button>
  18. </div>
  19. <group name="main">
  20. <group name="left">
  21. <field name="agreement_type_id"
  22. groups="agreement.group_use_agreement_type"/>
  23. <field name="is_template" groups="agreement.group_use_agreement_template"/>
  24. <field name="partner_id"
  25. attrs="{'required': [('is_template', '=', False)]}"/>
  26. <field name="name"/>
  27. <field name="signature_date"/>
  28. </group>
  29. <group name="right">
  30. <field name="start_date"/>
  31. <field name="end_date"/>
  32. <field name="code"/>
  33. <field name="company_id" groups="base.group_multi_company"/>
  34. </group>
  35. </group>
  36. <notebook>
  37. <page name="config" string="Configuration" attrs="{'invisible': True}"/>
  38. </notebook>
  39. </form>
  40. </field>
  41. </record>
  42. <record id="agreement_tree" model="ir.ui.view">
  43. <field name="name">agreement.tree</field>
  44. <field name="model">agreement</field>
  45. <field name="arch" type="xml">
  46. <tree string="Agreements">
  47. <field name="partner_id"/>
  48. <field name="code"/>
  49. <field name="name"/>
  50. <field name="signature_date"/>
  51. <field name="start_date"/>
  52. <field name="end_date"/>
  53. <field name="company_id" groups="base.group_multi_company"/>
  54. </tree>
  55. </field>
  56. </record>
  57. <record id="agreement_search" model="ir.ui.view">
  58. <field name="name">agreement.search</field>
  59. <field name="model">agreement</field>
  60. <field name="arch" type="xml">
  61. <search string="Search Agreements">
  62. <field name="name" filter_domain="['|', ('name', 'ilike', self), ('code', 'ilike', self)]" string="Name or Number"/>
  63. <field name="partner_id"/>
  64. <separator/>
  65. <filter name="inactive" string="Archived" domain="[('active', '=', False)]"/>
  66. <group name="groupby">
  67. <filter name="partner_groupby" string="Partner"
  68. context="{'group_by': 'partner_id'}"/>
  69. <filter name="signature_date_groupby" string="Signature Date"
  70. context="{'group_by': 'signature_date'}"/>
  71. </group>
  72. </search>
  73. </field>
  74. </record>
  75. <record id="agreement_action" model="ir.actions.act_window">
  76. <field name="name">Agreements</field>
  77. <field name="res_model">agreement</field>
  78. <field name="view_mode">tree,form</field>
  79. </record>
  80. <menuitem id="agreement_menu" action="agreement_action"
  81. sequence="100"/>
  82. </odoo>