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.

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