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.

168 lines
8.2 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_partner_form_inherit_base" model="ir.ui.view">
<field name="name">res.partner.view.form.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="priority">30</field>
<field name="arch" type="xml">
<h1 position="after">
<field name="ffck_network" />
<label for="ffck_network" />
</h1>
<xpath expr="//notebook/page[1]" position="after">
<page name="ffck" string="FFCK" attrs="{'invisible':[('ffck_network','!=',True)]}">
<group name="ffck_main" col="3">
<group name="ffck_common" class="o_label_nowrap">
<separator colspan="2" string="Licensee information"
attrs="{'invisible':[('is_company','=',True)]}" />
<separator colspan="2" string="Structure information"
attrs="{'invisible':[('is_company','=',False)]}" />
<label for="partner_code" string="License code"
attrs="{'invisible': [('is_company','=',True)]}" />
<label for="partner_code" string="Structure code"
attrs="{'invisible': [('is_company','=',False)]}" />
<field name="partner_code" nolabel="1"
attrs="{'readonly':[('partner_code_editable','=',False)],'required':[('ffck_network','=',True),('is_company','=',False),('partner_code_editable','=',False)]}" />
<field name="partner_code_editable" invisible="1" />
<button type="object" name="lock_partner_code" string="Lock partner code" icon="fa-lock"
class="btn btn-warning oe_right" colspan="2" attrs="{'invisible':[('partner_code_editable','=',False)]}" />
<field name="age_range_id" position="move" />
<field name="partner_scale" attrs="{'invisible': [('is_company','=',False)]}" />
<field name="ffck_structure_type_id" domain="[('scale','=',partner_scale)]"
attrs="{'invisible': [('is_company','=',False)]}" />
<field name="age_range" invisible="1" />
<field name="ffck_membership_type_id" domain="[('age_range','=',age_range)]"
attrs="{'invisible': [('is_company','=',True)]}" />
<separator string="Structure dates" colspan="2" />
<field name="first_membership_date" />
<field name="last_membership_date" />
<field name="last_membership_validity" />
</group>
<group name="ffck_network" colspan="2" string="Network" class="o_label_nowrap">
<field name="hierarchy_id" readonly="1" groups="base.group_no_one" />
<field name="ffck_partner_id" attrs="{'invisible': [('partner_scale', 'in', ['1'])]}" />
<label for="crck_partner_ids" attrs="{'invisible': [('partner_scale', '!=', '1')]}" colspan="2" />
<field name="crck_partner_ids" attrs="{'invisible': [('partner_scale', '!=', '1')]}" mode="kanban"
nolabel="1" colspan="2" readonly="1" />
<field name="crck_partner_id" attrs="{'invisible': [('partner_scale', 'in', ['1', '2'])]}" />
<label for="cdck_partner_ids" attrs="{'invisible': [('partner_scale', '!=', '2')]}" colspan="2" />
<field name="cdck_partner_ids" attrs="{'invisible': [('partner_scale', '!=', '2')]}" mode="kanban"
nolabel="1" colspan="2" readonly="1" />
<field name="cdck_partner_id" attrs="{'invisible': [('partner_scale', 'in', ['1', '2', '3'])]}" />
<label for="local_partner_ids" attrs="{'invisible': [('partner_scale', '!=', '3')]}" colspan="2" />
<field name="local_partner_ids" attrs="{'invisible': [('partner_scale', '!=', '3')]}" mode="kanban"
nolabel="1" colspan="2" readonly="1" />
<field name="local_partner_id" attrs="{'invisible': [('partner_scale', 'in', ['1', '2', '3', '4'])]}" />
</group>
</group>
</page>
</xpath>
<field name="age_range_id" position="attributes">
<attribute name="attrs">{'invisible': [('is_company','=',True)]}</attribute>
</field>
</field>
</record>
<record id="personal_information_form_inherit" model="ir.ui.view">
<field name="name">res.partner.form.inherit Birth place</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="partner_contact_personal_information_page.personal_information" />
<field name="priority">30</field>
<field name="arch" type="xml">
<field name="age" position="after">
<field name="age_range_id" widget="selection" />
<field name="gender" widget="radio" options="{'horizontal': true}" />
</field>
</field>
</record>
<record id="view_res_partner_filter_inherit_base" model="ir.ui.view">
<field name="name">res.partner.view.search.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter" />
<field name="priority">30</field>
<field name="arch" type="xml">
<filter name="type_person" position="attributes">
<attribute name="string">Persons</attribute>
</filter>
<filter name="type_company" position="attributes">
<attribute name="string">Structures</attribute>
</filter>
<filter name="association" position="after">
<separator />
<filter name="ffck_network" string="FFCK network" domain="[('ffck_network', '=', True)]" />
</filter>
<filter name="inactive" position="after">
<filter name="active" string="Active" domain="[('active','=',True)]" />
</filter>
<group name="group_by" position="inside">
<separator />
<filter name="partner_scale" string="Partner scale" domain="[]" context="{'group_by' : 'partner_scale'}" />
<filter name="ffck_structure_type" string="Structure type"
context="{'group_by' : 'ffck_structure_type_id'}" />
</group>
<search position="inside">
<searchpanel>
<field name="hierarchy_id" string="Hierarchy" icon="fa-sitemap" enable_counters="1" expand="1" limit="0" />
</searchpanel>
</search>
</field>
</record>
<record id="res_partner_view_search_inherit_persons" model="ir.ui.view">
<field name="name">res.partner.view.search.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="partner_contact_persons.res_partner_view_search" />
<field name="priority">30</field>
<field name="arch" type="xml">
<filter name="ffck_network" position="after">
<separator />
<filter name="adult" string="Adults" domain="[('age_range','=','adult')]" />
<filter name="young" string="Youngs" domain="[('age_range','=','young')]" />
</filter>
<filter name="ffck_structure_type" position="after">
<separator />
<filter name="by_age_range" string="Age range" context="{'group_by': 'age_range_id'}" />
<filter name="ffck_membership_type" string="License type"
context="{'group_by' : 'ffck_membership_type_id'}" />
</filter>
</field>
</record>
<!-- ACTIONS -->
<record id="contacts.action_contacts" model="ir.actions.act_window">
<field name="name">Structures</field>
<field name="context">{'default_is_company': True,
'search_default_type_company':1,
'search_default_ffck_network':1,
'search_default_state_groupby': 1}</field>
</record>
<record id="partner_contact_persons.action_persons" model="ir.actions.act_window">
<field name="context">{'default_is_company': False,
'search_default_type_person':1,
'search_default_ffck_network':1,
'search_default_by_age_range': 1}</field>
</record>
<!-- MENUS -->
<record id="contacts.res_partner_menu_contacts" model="ir.ui.menu">
<field name="name">Structures</field>
</record>
<record id="partner_multi_relation.menu_res_partner_relation" model="ir.ui.menu">
<field name="parent_id" ref="contacts.res_partner_menu_config" />
<field name="sequence">4</field>
</record>
<menuitem
id="ffck_contacts_config_menu"
name="FFCK params"
parent="contacts.res_partner_menu_config"
sequence="4" />
</odoo>