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.

77 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="sale_agreement_form" model="ir.ui.view">
  8. <field name="name">sale.agreement.form</field>
  9. <field name="model">sale.agreement</field>
  10. <field name="arch" type="xml">
  11. <form string="Sale 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. <field name="partner_id"/>
  21. <field name="name"/>
  22. <field name="code"/>
  23. <field name="signature_date"/>
  24. <field name="company_id" groups="base.group_multi_company"/>
  25. </group>
  26. <group string="Invoices" name="invoices">
  27. <field name="invoice_ids" nolabel="1"/>
  28. </group>
  29. </form>
  30. </field>
  31. </record>
  32. <record id="sale_agreement_tree" model="ir.ui.view">
  33. <field name="name">sale.agreement.tree</field>
  34. <field name="model">sale.agreement</field>
  35. <field name="arch" type="xml">
  36. <tree string="Sale Agreements">
  37. <field name="partner_id"/>
  38. <field name="code"/>
  39. <field name="name"/>
  40. <field name="signature_date"/>
  41. <field name="company_id" groups="base.group_multi_company"/>
  42. </tree>
  43. </field>
  44. </record>
  45. <record id="sale_agreement_search" model="ir.ui.view">
  46. <field name="name">sale.agreement.search</field>
  47. <field name="model">sale.agreement</field>
  48. <field name="arch" type="xml">
  49. <search string="Search Sale Agreements">
  50. <field name="name" filter_domain="['|', ('name', 'ilike', self), ('code', 'ilike', self)]" string="Name or Number"/>
  51. <field name="partner_id"/>
  52. <filter name="inactive" string="Archived" domain="[('active', '=', False)]"/>
  53. <group name="groupby">
  54. <filter name="partner_groupby" string="Customer"
  55. context="{'group_by': 'partner_id'}"/>
  56. <filter name="signature_date_groupby" string="Signature Date"
  57. context="{'group_by': 'signature_date'}"/>
  58. </group>
  59. </search>
  60. </field>
  61. </record>
  62. <record id="sale_agreement_action" model="ir.actions.act_window">
  63. <field name="name">Sale Agreements</field>
  64. <field name="res_model">sale.agreement</field>
  65. <field name="view_mode">tree,form</field>
  66. </record>
  67. <menuitem id="sale_agreement_menu" action="sale_agreement_action"
  68. parent="account.account_management_menu" sequence="100"/>
  69. </odoo>