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.

86 lines
3.1 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="partner_id"/>
  22. <field name="name"/>
  23. <field name="signature_date"/>
  24. </group>
  25. <group name="right">
  26. <field name="start_date"/>
  27. <field name="end_date"/>
  28. <field name="code"/>
  29. <field name="company_id" groups="base.group_multi_company"/>
  30. </group>
  31. </group>
  32. <notebook>
  33. <page name="config" string="Configuration" attrs="{'invisible': True}"/>
  34. </notebook>
  35. </form>
  36. </field>
  37. </record>
  38. <record id="agreement_tree" model="ir.ui.view">
  39. <field name="name">agreement.tree</field>
  40. <field name="model">agreement</field>
  41. <field name="arch" type="xml">
  42. <tree string="Agreements">
  43. <field name="partner_id"/>
  44. <field name="code"/>
  45. <field name="name"/>
  46. <field name="signature_date"/>
  47. <field name="start_date"/>
  48. <field name="end_date"/>
  49. <field name="company_id" groups="base.group_multi_company"/>
  50. </tree>
  51. </field>
  52. </record>
  53. <record id="agreement_search" model="ir.ui.view">
  54. <field name="name">agreement.search</field>
  55. <field name="model">agreement</field>
  56. <field name="arch" type="xml">
  57. <search string="Search Agreements">
  58. <field name="name" filter_domain="['|', ('name', 'ilike', self), ('code', 'ilike', self)]" string="Name or Number"/>
  59. <field name="partner_id"/>
  60. <separator/>
  61. <filter name="inactive" string="Archived" domain="[('active', '=', False)]"/>
  62. <group name="groupby">
  63. <filter name="partner_groupby" string="Partner"
  64. context="{'group_by': 'partner_id'}"/>
  65. <filter name="signature_date_groupby" string="Signature Date"
  66. context="{'group_by': 'signature_date'}"/>
  67. </group>
  68. </search>
  69. </field>
  70. </record>
  71. <record id="agreement_action" model="ir.actions.act_window">
  72. <field name="name">Agreements</field>
  73. <field name="res_model">agreement</field>
  74. <field name="view_mode">tree,form</field>
  75. </record>
  76. <menuitem id="agreement_menu" action="agreement_action"
  77. sequence="100"/>
  78. </odoo>