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.

167 lines
8.2 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="view_partner_form_inherit_base" model="ir.ui.view">
  4. <field name="name">res.partner.view.form.inherit</field>
  5. <field name="model">res.partner</field>
  6. <field name="inherit_id" ref="base.view_partner_form" />
  7. <field name="priority">30</field>
  8. <field name="arch" type="xml">
  9. <h1 position="after">
  10. <field name="ffck_network" />
  11. <label for="ffck_network" />
  12. </h1>
  13. <xpath expr="//notebook/page[1]" position="after">
  14. <page name="ffck" string="FFCK" attrs="{'invisible':[('ffck_network','!=',True)]}">
  15. <group name="ffck_main" col="3">
  16. <group name="ffck_common" class="o_label_nowrap">
  17. <separator colspan="2" string="Licensee information"
  18. attrs="{'invisible':[('is_company','=',True)]}" />
  19. <separator colspan="2" string="Structure information"
  20. attrs="{'invisible':[('is_company','=',False)]}" />
  21. <label for="partner_code" string="License code"
  22. attrs="{'invisible': [('is_company','=',True)]}" />
  23. <label for="partner_code" string="Structure code"
  24. attrs="{'invisible': [('is_company','=',False)]}" />
  25. <field name="partner_code" nolabel="1"
  26. attrs="{'readonly':[('partner_code_editable','=',False)],'required':[('ffck_network','=',True),('is_company','=',False),('partner_code_editable','=',False)]}" />
  27. <field name="partner_code_editable" invisible="1" />
  28. <button type="object" name="lock_partner_code" string="Lock partner code" icon="fa-lock"
  29. class="btn btn-warning oe_right" colspan="2" attrs="{'invisible':[('partner_code_editable','=',False)]}" />
  30. <field name="age_range_id" position="move" />
  31. <field name="partner_scale" attrs="{'invisible': [('is_company','=',False)]}" />
  32. <field name="ffck_structure_type_id" domain="[('scale','=',partner_scale)]"
  33. attrs="{'invisible': [('is_company','=',False)]}" />
  34. <field name="age_range" invisible="1" />
  35. <field name="ffck_membership_type_id" domain="[('age_range','=',age_range)]"
  36. attrs="{'invisible': ['|',('is_company','=',True),'|',('birthdate_date','=',False), ('nationality_id','=',False)]}" />
  37. <separator string="Structure dates" colspan="2" />
  38. <field name="first_membership_date" />
  39. <field name="last_membership_date" />
  40. <field name="last_membership_validity" />
  41. </group>
  42. <group name="ffck_network" colspan="2" string="Network" class="o_label_nowrap">
  43. <field name="hierarchy_id" readonly="1" groups="base.group_no_one" />
  44. <field name="ffck_partner_id" attrs="{'invisible': [('partner_scale', 'in', ['1'])]}" />
  45. <label for="crck_partner_ids" attrs="{'invisible': [('partner_scale', '!=', '1')]}" colspan="2" />
  46. <field name="crck_partner_ids" attrs="{'invisible': [('partner_scale', '!=', '1')]}" mode="kanban"
  47. nolabel="1" colspan="2" readonly="1" />
  48. <field name="crck_partner_id" attrs="{'invisible': [('partner_scale', 'in', ['1', '2'])]}" />
  49. <label for="cdck_partner_ids" attrs="{'invisible': [('partner_scale', '!=', '2')]}" colspan="2" />
  50. <field name="cdck_partner_ids" attrs="{'invisible': [('partner_scale', '!=', '2')]}" mode="kanban"
  51. nolabel="1" colspan="2" readonly="1" />
  52. <field name="cdck_partner_id" attrs="{'invisible': [('partner_scale', 'in', ['1', '2', '3'])]}" />
  53. <label for="local_partner_ids" attrs="{'invisible': [('partner_scale', '!=', '3')]}" colspan="2" />
  54. <field name="local_partner_ids" attrs="{'invisible': [('partner_scale', '!=', '3')]}" mode="kanban"
  55. nolabel="1" colspan="2" readonly="1" />
  56. <field name="local_partner_id" attrs="{'invisible': [('partner_scale', 'in', ['1', '2', '3', '4'])]}" />
  57. </group>
  58. </group>
  59. </page>
  60. </xpath>
  61. <field name="age_range_id" position="attributes">
  62. <attribute name="attrs">{'invisible': [('is_company','=',True)]}</attribute>
  63. </field>
  64. </field>
  65. </record>
  66. <record id="personal_information_form_inherit" model="ir.ui.view">
  67. <field name="name">res.partner.form.inherit Birth place</field>
  68. <field name="model">res.partner</field>
  69. <field name="inherit_id" ref="partner_contact_personal_information_page.personal_information" />
  70. <field name="priority">30</field>
  71. <field name="arch" type="xml">
  72. <field name="age" position="after">
  73. <field name="age_range_id" widget="selection" />
  74. <field name="gender" widget="radio" options="{'horizontal': true}" />
  75. </field>
  76. </field>
  77. </record>
  78. <record id="view_res_partner_filter_inherit_base" model="ir.ui.view">
  79. <field name="name">res.partner.view.search.inherit</field>
  80. <field name="model">res.partner</field>
  81. <field name="inherit_id" ref="base.view_res_partner_filter" />
  82. <field name="priority">30</field>
  83. <field name="arch" type="xml">
  84. <filter name="type_person" position="attributes">
  85. <attribute name="string">Persons</attribute>
  86. </filter>
  87. <filter name="type_company" position="attributes">
  88. <attribute name="string">Structures</attribute>
  89. </filter>
  90. <filter name="association" position="after">
  91. <separator />
  92. <filter name="ffck_network" string="FFCK network" domain="[('ffck_network', '=', True)]" />
  93. </filter>
  94. <filter name="inactive" position="after">
  95. <filter name="active" string="Active" domain="[('active','=',True)]" />
  96. </filter>
  97. <group name="group_by" position="inside">
  98. <separator />
  99. <filter name="partner_scale" string="Partner scale" domain="[]" context="{'group_by' : 'partner_scale'}" />
  100. <filter name="ffck_structure_type" string="Structure type"
  101. context="{'group_by' : 'ffck_structure_type_id'}" />
  102. </group>
  103. <search position="inside">
  104. <searchpanel>
  105. <field name="hierarchy_id" string="Hierarchy" icon="fa-sitemap" enable_counters="1" expand="1" limit="0" />
  106. </searchpanel>
  107. </search>
  108. </field>
  109. </record>
  110. <record id="res_partner_view_search_inherit_persons" model="ir.ui.view">
  111. <field name="name">res.partner.view.search.inherit</field>
  112. <field name="model">res.partner</field>
  113. <field name="inherit_id" ref="partner_contact_persons.res_partner_view_search" />
  114. <field name="priority">30</field>
  115. <field name="arch" type="xml">
  116. <filter name="ffck_network" position="after">
  117. <separator />
  118. <filter name="adult" string="Adults" domain="[('age_range','=','adult')]" />
  119. <filter name="young" string="Youngs" domain="[('age_range','=','young')]" />
  120. </filter>
  121. <filter name="ffck_structure_type" position="after">
  122. <separator />
  123. <filter name="by_age_range" string="Age range" context="{'group_by': 'age_range_id'}" />
  124. <filter name="ffck_membership_type" string="License type"
  125. context="{'group_by' : 'ffck_membership_type_id'}" />
  126. </filter>
  127. </field>
  128. </record>
  129. <!-- ACTIONS -->
  130. <record id="contacts.action_contacts" model="ir.actions.act_window">
  131. <field name="name">Structures</field>
  132. <field name="context">{'default_is_company': True,
  133. 'search_default_type_company':1,
  134. 'search_default_ffck_network':1,
  135. 'search_default_state_groupby': 1}</field>
  136. </record>
  137. <record id="partner_contact_persons.action_persons" model="ir.actions.act_window">
  138. <field name="context">{'default_is_company': False,
  139. 'search_default_type_person':1,
  140. 'search_default_ffck_network':1,
  141. 'search_default_by_age_range': 1}</field>
  142. </record>
  143. <!-- MENUS -->
  144. <record id="contacts.res_partner_menu_contacts" model="ir.ui.menu">
  145. <field name="name">Structures</field>
  146. </record>
  147. <record id="partner_multi_relation.menu_res_partner_relation" model="ir.ui.menu">
  148. <field name="parent_id" ref="contacts.res_partner_menu_config" />
  149. <field name="sequence">4</field>
  150. </record>
  151. <menuitem
  152. id="ffck_contacts_config_menu"
  153. name="FFCK params"
  154. parent="contacts.res_partner_menu_config"
  155. sequence="4" />
  156. </odoo>