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.

111 lines
4.4 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="agreement_type" widget="radio"/>
  27. <field name="code"/>
  28. <field name="company_id" groups="base.group_multi_company"/>
  29. </group>
  30. </group>
  31. <notebook>
  32. <page string="Sales" class="oe_page_title"
  33. attrs="{'invisible': [('agreement_type', '!=', 'sale')]}">
  34. <group name="sale">
  35. <group name="sale_left">
  36. </group>
  37. <group name="sale_right">
  38. </group>
  39. </group>
  40. <group string="Customer Invoices" name="out_invoices">
  41. <field name="out_invoice_ids" colspan="4" nolabel="1"/>
  42. </group>
  43. </page>
  44. <page string="Purchases" class="oe_page_title"
  45. attrs="{'invisible': [('agreement_type', '!=', 'purchase')]}">
  46. <group name="purchase">
  47. <group name="purchase_left">
  48. </group>
  49. <group name="purchase_right">
  50. </group>
  51. </group>
  52. <group string="Supplier Invoices" name="in_invoices">
  53. <field name="in_invoice_ids" colspan="4" nolabel="1"/>
  54. </group>
  55. </page>
  56. </notebook>
  57. </form>
  58. </field>
  59. </record>
  60. <record id="agreement_tree" model="ir.ui.view">
  61. <field name="name">agreement.tree</field>
  62. <field name="model">agreement</field>
  63. <field name="arch" type="xml">
  64. <tree string="Agreements">
  65. <field name="partner_id"/>
  66. <field name="code"/>
  67. <field name="name"/>
  68. <field name="agreement_type"/>
  69. <field name="signature_date"/>
  70. <field name="company_id" groups="base.group_multi_company"/>
  71. </tree>
  72. </field>
  73. </record>
  74. <record id="agreement_search" model="ir.ui.view">
  75. <field name="name">agreement.search</field>
  76. <field name="model">agreement</field>
  77. <field name="arch" type="xml">
  78. <search string="Search Agreements">
  79. <field name="name" filter_domain="['|', ('name', 'ilike', self), ('code', 'ilike', self)]" string="Name or Number"/>
  80. <field name="partner_id"/>
  81. <filter name="sale" string="Sale" domain="[('agreement_type', '=', 'sale')]"/>
  82. <filter name="purchase" string="Purchase" domain="[('agreement_type', '=', 'purchase')]"/>
  83. <separator/>
  84. <filter name="inactive" string="Archived" domain="[('active', '=', False)]"/>
  85. <group name="groupby">
  86. <filter name="partner_groupby" string="Customer"
  87. context="{'group_by': 'partner_id'}"/>
  88. <filter name="signature_date_groupby" string="Signature Date"
  89. context="{'group_by': 'signature_date'}"/>
  90. <filter name="agreement_type_groupby" string="Type"
  91. context="{'group_by': 'agreement_type'}"/>
  92. </group>
  93. </search>
  94. </field>
  95. </record>
  96. <record id="agreement_action" model="ir.actions.act_window">
  97. <field name="name">Agreements</field>
  98. <field name="res_model">agreement</field>
  99. <field name="view_mode">tree,form</field>
  100. </record>
  101. <menuitem id="agreement_menu" action="agreement_action"
  102. parent="account.account_management_menu" sequence="100"/>
  103. </odoo>