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.

89 lines
4.3 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. <?xml version="1.0"?>
  2. <odoo>
  3. <!-- Agreement Sections Sequences-->
  4. <record id="seq_agreement_section" model="ir.sequence">
  5. <field name="name">agreement_section_sequencer</field>
  6. <field name="code">agreement.section</field>
  7. <field name="prefix">0</field>
  8. <field name="padding">1</field>
  9. </record>
  10. <!-- Agreement Sections List View-->
  11. <record model="ir.ui.view" id="partner_agreement_section_list_view">
  12. <field name="name">Agreement Section List</field>
  13. <field name="model">agreement.section</field>
  14. <field name="arch" type="xml">
  15. <tree default_order='agreement_id, section_sequence'>
  16. <field name="agreement_id" string="Agreement"/>
  17. <field name="section_sequence" string="Sequence"/>
  18. <field name="name" string="Section Name"/>
  19. <field name="active" invisible="1"/>
  20. </tree>
  21. </field>
  22. </record>
  23. <!-- Agreement Sections Form View -->
  24. <record model="ir.ui.view" id="partner_agreement_section_form_view">
  25. <field name="name">Agreement Section Form</field>
  26. <field name="model">agreement.section</field>
  27. <field name="arch" type="xml">
  28. <form string="Agreements Section Form">
  29. <sheet>
  30. <div class="oe_title">
  31. <label for="name" class="oe_edit_only" string="Section Name"/>
  32. <h1><field name="name" string="Section Name"/></h1>
  33. </div>
  34. <group>
  35. <field name="agreement_id" string="Agreement"/>
  36. </group>
  37. <group>
  38. <field name='content' string="Content"/>
  39. </group>
  40. <notebook>
  41. <page string="Clauses">
  42. <field name="clauses_ids" string="Clauses" context="{'default_section_id': active_id,'default_agreement_id': agreement_id}">
  43. <tree>
  44. <field name="clause_sequence" widget="handle"/>
  45. <field name="name"/>
  46. <field name="content"/>
  47. </tree>
  48. </field>
  49. </page>
  50. <page string="Dynamic Placeholder Generator">
  51. THIS IS UNDER DEVELOPEMENT: The purpose of this section is to be able to create dynamic fields inside your content.
  52. <group>
  53. <field name="model_id"/>
  54. <field name="model_object_field_id" domain="[('model_id','=',model_id),('ttype','!=','one2many'),('ttype','!=','many2many')]"/>
  55. <field name="sub_object_id" readonly="1"/>
  56. <field name="sub_model_object_field_id" domain="[('model_id','=',sub_object_id),('ttype','!=','one2many'),('ttype','!=','many2many')]" attrs="{'readonly':[('sub_object_id','=',False)],'required':[('sub_object_id','!=',False)]}"/>
  57. <field name="null_value"/>
  58. <field name="copyvalue"/>
  59. </group>
  60. </page>
  61. </notebook>
  62. Sequence #<field name="section_sequence" readonly="1"/>
  63. </sheet>
  64. </form>
  65. </field>
  66. </record>
  67. <!-- Agreement Section Search View -->
  68. <record model="ir.ui.view" id="partner_agreement_section_search_view">
  69. <field name="name">Agreement Section Search</field>
  70. <field name="model">agreement.section</field>
  71. <field name="arch" type="xml">
  72. <search string="Agreement Section Search">
  73. <filter name="group_agreement" string="Agreements" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
  74. </search>
  75. </field>
  76. </record>
  77. <!-- Actions opening views on models -->
  78. <record model="ir.actions.act_window" id="partner_agreement_action_section">
  79. <field name="name">Agreement Sections</field>
  80. <field name="res_model">agreement.section</field>
  81. <field name="view_mode">tree,form</field>
  82. </record>
  83. </odoo>