Ronald Portier
5 years ago
committed by
Raf Ven
16 changed files with 1347 additions and 1227 deletions
-
19partner_multi_relation/__manifest__.py
-
215partner_multi_relation/data/demo.xml
-
181partner_multi_relation/models/res_partner.py
-
94partner_multi_relation/models/res_partner_relation.py
-
329partner_multi_relation/models/res_partner_relation_all.py
-
190partner_multi_relation/models/res_partner_relation_type.py
-
79partner_multi_relation/models/res_partner_relation_type_selection.py
-
2partner_multi_relation/readme/USAGE.rst
-
524partner_multi_relation/tests/test_partner_relation.py
-
327partner_multi_relation/tests/test_partner_relation_all.py
-
138partner_multi_relation/tests/test_partner_relation_common.py
-
74partner_multi_relation/tests/test_partner_search.py
-
55partner_multi_relation/views/menu.xml
-
78partner_multi_relation/views/res_partner.xml
-
174partner_multi_relation/views/res_partner_relation_all.xml
-
95partner_multi_relation/views/res_partner_relation_type.xml
@ -1,116 +1,111 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Added partner categories and partners to this file, because it |
|||
<!-- Added partner categories and partners to this file, because it |
|||
turned out to be a bad idea to rely on demo data in base module, |
|||
that can change from release to release. Only dependency on |
|||
countries remain. They are less likely to change/disappear. |
|||
--> |
|||
|
|||
<!-- Partner relation types --> |
|||
<record id="rel_type_assistant" model="res.partner.relation.type"> |
|||
<field name="name">Is assistant of</field> |
|||
<field name="name_inverse">Has assistant</field> |
|||
<field name="contact_type_left">p</field> |
|||
<field name="contact_type_right">p</field> |
|||
</record> |
|||
<record id="rel_type_competitor" model="res.partner.relation.type"> |
|||
<field name="name">Is competitor of</field> |
|||
<field name="name_inverse">Is competitor of</field> |
|||
<field name="contact_type_left">c</field> |
|||
<field name="contact_type_right">c</field> |
|||
<field name="is_symmetric" eval="True" /> |
|||
</record> |
|||
<record id="rel_type_has_worked_for" model="res.partner.relation.type"> |
|||
<field name="name">Has worked for</field> |
|||
<field name="name_inverse">Has former employee</field> |
|||
<field name="contact_type_left">p</field> |
|||
<field name="contact_type_right">c</field> |
|||
</record> |
|||
|
|||
<!-- Categories --> |
|||
<record id="res_partner_category_pmr_0" model="res.partner.category"> |
|||
<field name="name">Washing Companies</field> |
|||
</record> |
|||
<record id="res_partner_category_pmr_4" model="res.partner.category"> |
|||
<field name="name">Washing Gold</field> |
|||
<field name="parent_id" ref="res_partner_category_pmr_0"/> |
|||
</record> |
|||
<record id="res_partner_category_pmr_5" model="res.partner.category"> |
|||
<field name="name">Washing Silver</field> |
|||
<field name="parent_id" ref="res_partner_category_pmr_0"/> |
|||
</record> |
|||
<record id="res_partner_category_pmr_11" model="res.partner.category"> |
|||
<field name="name">Washing Services</field> |
|||
<field name="parent_id" ref="res_partner_category_pmr_0"/> |
|||
</record> |
|||
|
|||
<!-- Partners --> |
|||
<record id="res_partner_pmr_great" model="res.partner"> |
|||
<field name="name">Great Washing Powder Company</field> |
|||
<field |
|||
name="category_id" |
|||
eval="[(6, 0, [ref('res_partner_category_pmr_11'), ref('res_partner_category_pmr_4')])]" |
|||
/> |
|||
<field name="supplier">1</field> |
|||
<field name="customer">1</field> |
|||
<field name="is_company">1</field> |
|||
<field name="city">Le Bourget du Lac</field> |
|||
<field name="zip">73377</field> |
|||
<field name="phone">+33 4 49 23 44 54</field> |
|||
<field name="country_id" ref="base.fr"/> |
|||
<field name="street">93, Press Avenue</field> |
|||
<field name="email">great@yourcompany.example.com</field> |
|||
<field name="website">http://www.great.com</field> |
|||
</record> |
|||
<record id="res_partner_pmr_best" model="res.partner"> |
|||
<field name="name">Best Washing Powder Company</field> |
|||
<field |
|||
name="category_id" |
|||
eval="[(6, 0, [ref('res_partner_category_pmr_4'), ref('res_partner_category_pmr_11')])]" |
|||
/> |
|||
<field name="supplier">1</field> |
|||
<field name="is_company">1</field> |
|||
<field name="city">Champs sur Marne</field> |
|||
<field name="zip">77420</field> |
|||
<field name="country_id" ref="base.fr"/> |
|||
<field name="email">best@yourcompany.example.com</field> |
|||
<field name="phone">+33 1 64 61 04 01</field> |
|||
<field name="street">12 rue Albert Einstein</field> |
|||
<field name="website">http://www.best.com/</field> |
|||
</record> |
|||
<record id="res_partner_pmr_super" model="res.partner"> |
|||
<field name="name">Super Washing Powder Company</field> |
|||
<field |
|||
name="category_id" |
|||
eval="[(6,0,[ref('res_partner_category_pmr_5')])]" |
|||
/> |
|||
<field name="supplier">1</field> |
|||
<field eval="1" name="customer"/> |
|||
<field name="is_company">1</field> |
|||
<field name="street">3rd Floor, Room 3-C,</field> |
|||
<field name="street2">Carretera Panamericana, Km 1, Urb. Delgado Chalbaud</field> |
|||
<field name="city">Caracas</field> |
|||
<field name="zip">1090</field> |
|||
<field name="email">super@yourcompany.example.com</field> |
|||
<field name="phone">+58 212 681 0538</field> |
|||
<field name="country_id" ref="base.ve"/> |
|||
<field name="website">super.com</field> |
|||
</record> |
|||
|
|||
<!-- Relations --> |
|||
<record id="rel_1" model="res.partner.relation"> |
|||
<field name="left_partner_id" ref="res_partner_pmr_great" /> |
|||
<field name="right_partner_id" ref="res_partner_pmr_super" /> |
|||
<field name="type_id" ref="rel_type_competitor" /> |
|||
</record> |
|||
<record id="rel_2" model="res.partner.relation"> |
|||
<field name="left_partner_id" ref="res_partner_pmr_best" /> |
|||
<field name="right_partner_id" ref="res_partner_pmr_super" /> |
|||
<field name="type_id" ref="rel_type_competitor" /> |
|||
</record> |
|||
<record id="rel_3" model="res.partner.relation"> |
|||
<field name="left_partner_id" ref="res_partner_pmr_great" /> |
|||
<field name="right_partner_id" ref="res_partner_pmr_best" /> |
|||
<field name="type_id" ref="rel_type_competitor" /> |
|||
</record> |
|||
<!-- Partner relation types --> |
|||
<record id="rel_type_assistant" model="res.partner.relation.type"> |
|||
<field name="name">Is assistant of</field> |
|||
<field name="name_inverse">Has assistant</field> |
|||
<field name="contact_type_left">p</field> |
|||
<field name="contact_type_right">p</field> |
|||
</record> |
|||
<record id="rel_type_competitor" model="res.partner.relation.type"> |
|||
<field name="name">Is competitor of</field> |
|||
<field name="name_inverse">Is competitor of</field> |
|||
<field name="contact_type_left">c</field> |
|||
<field name="contact_type_right">c</field> |
|||
<field name="is_symmetric" eval="True" /> |
|||
</record> |
|||
<record id="rel_type_has_worked_for" model="res.partner.relation.type"> |
|||
<field name="name">Has worked for</field> |
|||
<field name="name_inverse">Has former employee</field> |
|||
<field name="contact_type_left">p</field> |
|||
<field name="contact_type_right">c</field> |
|||
</record> |
|||
<!-- Categories --> |
|||
<record id="res_partner_category_pmr_0" model="res.partner.category"> |
|||
<field name="name">Washing Companies</field> |
|||
</record> |
|||
<record id="res_partner_category_pmr_4" model="res.partner.category"> |
|||
<field name="name">Washing Gold</field> |
|||
<field name="parent_id" ref="res_partner_category_pmr_0" /> |
|||
</record> |
|||
<record id="res_partner_category_pmr_5" model="res.partner.category"> |
|||
<field name="name">Washing Silver</field> |
|||
<field name="parent_id" ref="res_partner_category_pmr_0" /> |
|||
</record> |
|||
<record id="res_partner_category_pmr_11" model="res.partner.category"> |
|||
<field name="name">Washing Services</field> |
|||
<field name="parent_id" ref="res_partner_category_pmr_0" /> |
|||
</record> |
|||
<!-- Partners --> |
|||
<record id="res_partner_pmr_great" model="res.partner"> |
|||
<field name="name">Great Washing Powder Company</field> |
|||
<field |
|||
name="category_id" |
|||
eval="[(6, 0, [ref('res_partner_category_pmr_11'), ref('res_partner_category_pmr_4')])]" |
|||
/> |
|||
<field name="supplier">1</field> |
|||
<field name="customer">1</field> |
|||
<field name="is_company">1</field> |
|||
<field name="city">Le Bourget du Lac</field> |
|||
<field name="zip">73377</field> |
|||
<field name="phone">+33 4 49 23 44 54</field> |
|||
<field name="country_id" ref="base.fr" /> |
|||
<field name="street">93, Press Avenue</field> |
|||
<field name="email">great@yourcompany.example.com</field> |
|||
<field name="website">http://www.great.com</field> |
|||
</record> |
|||
<record id="res_partner_pmr_best" model="res.partner"> |
|||
<field name="name">Best Washing Powder Company</field> |
|||
<field |
|||
name="category_id" |
|||
eval="[(6, 0, [ref('res_partner_category_pmr_4'), ref('res_partner_category_pmr_11')])]" |
|||
/> |
|||
<field name="supplier">1</field> |
|||
<field name="is_company">1</field> |
|||
<field name="city">Champs sur Marne</field> |
|||
<field name="zip">77420</field> |
|||
<field name="country_id" ref="base.fr" /> |
|||
<field name="email">best@yourcompany.example.com</field> |
|||
<field name="phone">+33 1 64 61 04 01</field> |
|||
<field name="street">12 rue Albert Einstein</field> |
|||
<field name="website">http://www.best.com/</field> |
|||
</record> |
|||
<record id="res_partner_pmr_super" model="res.partner"> |
|||
<field name="name">Super Washing Powder Company</field> |
|||
<field name="category_id" eval="[(6,0,[ref('res_partner_category_pmr_5')])]" /> |
|||
<field name="supplier">1</field> |
|||
<field eval="1" name="customer" /> |
|||
<field name="is_company">1</field> |
|||
<field name="street">3rd Floor, Room 3-C,</field> |
|||
<field |
|||
name="street2" |
|||
>Carretera Panamericana, Km 1, Urb. Delgado Chalbaud</field> |
|||
<field name="city">Caracas</field> |
|||
<field name="zip">1090</field> |
|||
<field name="email">super@yourcompany.example.com</field> |
|||
<field name="phone">+58 212 681 0538</field> |
|||
<field name="country_id" ref="base.ve" /> |
|||
<field name="website">super.com</field> |
|||
</record> |
|||
<!-- Relations --> |
|||
<record id="rel_1" model="res.partner.relation"> |
|||
<field name="left_partner_id" ref="res_partner_pmr_great" /> |
|||
<field name="right_partner_id" ref="res_partner_pmr_super" /> |
|||
<field name="type_id" ref="rel_type_competitor" /> |
|||
</record> |
|||
<record id="rel_2" model="res.partner.relation"> |
|||
<field name="left_partner_id" ref="res_partner_pmr_best" /> |
|||
<field name="right_partner_id" ref="res_partner_pmr_super" /> |
|||
<field name="type_id" ref="rel_type_competitor" /> |
|||
</record> |
|||
<record id="rel_3" model="res.partner.relation"> |
|||
<field name="left_partner_id" ref="res_partner_pmr_great" /> |
|||
<field name="right_partner_id" ref="res_partner_pmr_best" /> |
|||
<field name="type_id" ref="rel_type_competitor" /> |
|||
</record> |
|||
</odoo> |
@ -1,32 +1,27 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
|
|||
<menuitem |
|||
id="menu_res_partner_relation" |
|||
name="Relations" |
|||
sequence="3" |
|||
parent="contacts.menu_contacts" |
|||
/> |
|||
|
|||
<menuitem |
|||
id="menu_res_partner_relation_all" |
|||
sequence="3" |
|||
parent="menu_res_partner_relation" |
|||
action="action_res_partner_relation_all" |
|||
/> |
|||
|
|||
<act_window |
|||
id="action_res_partner_relation_type" |
|||
res_model="res.partner.relation.type" |
|||
view_mode="tree,form" |
|||
name="Partner Relations Types" |
|||
/> |
|||
|
|||
<menuitem |
|||
id="menu_res_partner_relation_type" |
|||
name="Relation Types" |
|||
parent="menu_res_partner_relation" |
|||
action="action_res_partner_relation_type" |
|||
/> |
|||
|
|||
<menuitem |
|||
id="menu_res_partner_relation" |
|||
name="Relations" |
|||
sequence="3" |
|||
parent="contacts.menu_contacts" |
|||
/> |
|||
<menuitem |
|||
id="menu_res_partner_relation_all" |
|||
sequence="3" |
|||
parent="menu_res_partner_relation" |
|||
action="action_res_partner_relation_all" |
|||
/> |
|||
<act_window |
|||
id="action_res_partner_relation_type" |
|||
res_model="res.partner.relation.type" |
|||
view_mode="tree,form" |
|||
name="Partner Relations Types" |
|||
/> |
|||
<menuitem |
|||
id="menu_res_partner_relation_type" |
|||
name="Relation Types" |
|||
parent="menu_res_partner_relation" |
|||
action="action_res_partner_relation_type" |
|||
/> |
|||
</odoo> |
@ -1,43 +1,41 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
|
|||
<record id="view_res_partner_filter" model="ir.ui.view"> |
|||
<field name="name">partner_multi_relation.view_partner_filter</field> |
|||
<field name="inherit_id" ref="base.view_res_partner_filter" /> |
|||
<field name="model">res.partner</field> |
|||
<field type="xml" name="arch"> |
|||
<field name="parent_id" position="after"> |
|||
<field name="search_relation_partner_id" /> |
|||
<field name="search_relation_type_id" /> |
|||
<field name="search_relation_date" /> |
|||
<field name="search_relation_partner_category_id" /> |
|||
</field> |
|||
<record id="view_res_partner_filter" model="ir.ui.view"> |
|||
<field name="name">partner_multi_relation.view_partner_filter</field> |
|||
<field name="inherit_id" ref="base.view_res_partner_filter" /> |
|||
<field name="model">res.partner</field> |
|||
<field type="xml" name="arch"> |
|||
<field name="parent_id" position="after"> |
|||
<field name="search_relation_partner_id" /> |
|||
<field name="search_relation_type_id" /> |
|||
<field name="search_relation_date" /> |
|||
<field name="search_relation_partner_category_id" /> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_partner_form" model="ir.ui.view"> |
|||
<field name="name">partner_multi_relation.view_partner_form</field> |
|||
<field name="inherit_id" ref="base.view_partner_form" /> |
|||
<field name="model">res.partner</field> |
|||
<field type="xml" name="arch"> |
|||
<xpath expr="//div[@name='button_box']" position="inside"> |
|||
<button name="action_view_relations" |
|||
type="object" |
|||
class="oe_stat_button" |
|||
icon="fa-users"> |
|||
<field name="relation_count" |
|||
widget="statinfo" |
|||
string="Relations"/> |
|||
</button> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
|
|||
<act_window id="action_show_partner_multi_relation" |
|||
name="Show partner's relations" |
|||
src_model="res.partner" |
|||
res_model="res.partner.relation.all" |
|||
domain="[('this_partner_id', 'in', active_ids)]" |
|||
key2="client_action_multi" /> |
|||
|
|||
</field> |
|||
</record> |
|||
<record id="view_partner_form" model="ir.ui.view"> |
|||
<field name="name">partner_multi_relation.view_partner_form</field> |
|||
<field name="inherit_id" ref="base.view_partner_form" /> |
|||
<field name="model">res.partner</field> |
|||
<field type="xml" name="arch"> |
|||
<xpath expr="//div[@name='button_box']" position="inside"> |
|||
<button |
|||
name="action_view_relations" |
|||
type="object" |
|||
class="oe_stat_button" |
|||
icon="fa-users" |
|||
> |
|||
<field name="relation_count" widget="statinfo" string="Relations" /> |
|||
</button> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
<act_window |
|||
id="action_show_partner_multi_relation" |
|||
name="Show partner's relations" |
|||
src_model="res.partner" |
|||
res_model="res.partner.relation.all" |
|||
domain="[('this_partner_id', 'in', active_ids)]" |
|||
key2="client_action_multi" |
|||
/> |
|||
</odoo> |
@ -1,101 +1,91 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
|
|||
<record id="tree_res_partner_relation_all" model="ir.ui.view"> |
|||
<field name="model">res.partner.relation.all</field> |
|||
<field name="arch" type="xml"> |
|||
<tree |
|||
string="Partner Relations" |
|||
colors="gray:not active; blue:date_start > current_date" |
|||
editable="top" |
|||
> |
|||
<field |
|||
name="this_partner_id" |
|||
required="True" |
|||
options="{'no_create': True}" |
|||
/> |
|||
<field |
|||
name="type_selection_id" |
|||
required="True" |
|||
options="{'no_create': True}" |
|||
/> |
|||
<field |
|||
name="other_partner_id" |
|||
required="True" |
|||
options="{'no_create': True}" |
|||
/> |
|||
<field name="date_start" /> |
|||
<field name="date_end" /> |
|||
<field name="active" invisible="1" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="search_res_partner_relation_all" model="ir.ui.view"> |
|||
<field name="model">res.partner.relation.all</field> |
|||
<field name="arch" type="xml"> |
|||
<search string="Search Relations"> |
|||
<field name="any_partner_id" widget="many2one"/> |
|||
<field name="this_partner_id"/> |
|||
<field name="other_partner_id"/> |
|||
<field name="type_selection_id"/> |
|||
<record id="tree_res_partner_relation_all" model="ir.ui.view"> |
|||
<field name="model">res.partner.relation.all</field> |
|||
<field name="arch" type="xml"> |
|||
<tree |
|||
string="Partner Relations" |
|||
colors="gray:not active; blue:date_start > current_date" |
|||
editable="top" |
|||
> |
|||
<field |
|||
name="this_partner_id" |
|||
required="True" |
|||
options="{'no_create': True}" |
|||
/> |
|||
<field |
|||
name="type_selection_id" |
|||
required="True" |
|||
options="{'no_create': True}" |
|||
/> |
|||
<field |
|||
name="other_partner_id" |
|||
required="True" |
|||
options="{'no_create': True}" |
|||
/> |
|||
<field name="date_start" /> |
|||
<field name="date_end" /> |
|||
<field name="active" invisible="1" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<record id="search_res_partner_relation_all" model="ir.ui.view"> |
|||
<field name="model">res.partner.relation.all</field> |
|||
<field name="arch" type="xml"> |
|||
<search string="Search Relations"> |
|||
<field name="any_partner_id" widget="many2one" /> |
|||
<field name="this_partner_id" /> |
|||
<field name="other_partner_id" /> |
|||
<field name="type_selection_id" /> |
|||
<filter |
|||
name="left_to_right" |
|||
string="Left to right" |
|||
domain="[('is_inverse', '=', False)]" |
|||
/> |
|||
<filter |
|||
name="right_to_left" |
|||
string="Right to left" |
|||
domain="[('is_inverse', '=', True)]" |
|||
/> |
|||
<filter |
|||
name="include_part_records" |
|||
string="Include past records" |
|||
context="{'active_test': False}" |
|||
/> |
|||
<group expand="0" string="Group By"> |
|||
<filter |
|||
name="left_to_right" |
|||
string="Left to right" |
|||
domain="[('is_inverse', '=', False)]" |
|||
/> |
|||
name="group_by_this_partner_id" |
|||
string="One Partner" |
|||
context="{'group_by': 'this_partner_id'}" |
|||
/> |
|||
<filter |
|||
name="right_to_left" |
|||
string="Right to left" |
|||
domain="[('is_inverse', '=', True)]" |
|||
/> |
|||
name="group_by_type_selection_id" |
|||
string="Relationship Type" |
|||
context="{'group_by': 'type_selection_id'}" |
|||
/> |
|||
<filter |
|||
name="include_part_records" |
|||
string="Include past records" |
|||
context="{'active_test': False}" |
|||
/> |
|||
<group expand="0" string="Group By"> |
|||
<filter |
|||
name="group_by_this_partner_id" |
|||
string="One Partner" |
|||
context="{'group_by': 'this_partner_id'}" |
|||
/> |
|||
<filter |
|||
name="group_by_type_selection_id" |
|||
string="Relationship Type" |
|||
context="{'group_by': 'type_selection_id'}" |
|||
/> |
|||
<filter |
|||
name="group_by_other_partner_id" |
|||
string="Other Partner" |
|||
context="{'group_by': 'other_partner_id'}" |
|||
/> |
|||
</group> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
|
|||
<record |
|||
id="action_res_partner_relation_all" |
|||
model="ir.actions.act_window" |
|||
> |
|||
<field name="name">Relations</field> |
|||
<field name="res_model">res.partner.relation.all</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree</field> |
|||
<field name="view_id" ref="tree_res_partner_relation_all"/> |
|||
<field |
|||
name="search_view_id" |
|||
ref="search_res_partner_relation_all" |
|||
/> |
|||
<field name="context">{'active_test': 0}</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
name="group_by_other_partner_id" |
|||
string="Other Partner" |
|||
context="{'group_by': 'other_partner_id'}" |
|||
/> |
|||
</group> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
<record id="action_res_partner_relation_all" model="ir.actions.act_window"> |
|||
<field name="name">Relations</field> |
|||
<field name="res_model">res.partner.relation.all</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree</field> |
|||
<field name="view_id" ref="tree_res_partner_relation_all" /> |
|||
<field name="search_view_id" ref="search_res_partner_relation_all" /> |
|||
<field name="context">{'active_test': 0}</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Record and track your partners' relations. Relations may |
|||
be linked to other partners with a type either directly |
|||
or inversely. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
|
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -1,56 +1,49 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
|
|||
<record id="tree_res_partner_relation_type" model="ir.ui.view"> |
|||
<field name="model">res.partner.relation.type</field> |
|||
<field type="xml" name="arch"> |
|||
<tree> |
|||
<field name="name" /> |
|||
<field name="name_inverse" /> |
|||
<field name="contact_type_left" /> |
|||
<field name="contact_type_right" /> |
|||
<field name="allow_self" /> |
|||
<field name="is_symmetric" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="form_res_partner_relation_type" model="ir.ui.view"> |
|||
<field name="model">res.partner.relation.type</field> |
|||
<field type="xml" name="arch"> |
|||
<form> |
|||
<sheet> |
|||
<group> |
|||
<group |
|||
string="Left side of relation" |
|||
name="left" |
|||
> |
|||
<field name="name" /> |
|||
<field name="contact_type_left" /> |
|||
<field name="partner_category_left" /> |
|||
</group> |
|||
<group |
|||
string="Right side of relation" |
|||
name="right" |
|||
attrs="{'invisible': [('is_symmetric', '=', True)]}" |
|||
> |
|||
<field name="name_inverse" attrs="{'required': [('is_symmetric', '=', False)]}"/> |
|||
<field name="contact_type_right" /> |
|||
<field name="partner_category_right" /> |
|||
</group> |
|||
<record id="tree_res_partner_relation_type" model="ir.ui.view"> |
|||
<field name="model">res.partner.relation.type</field> |
|||
<field type="xml" name="arch"> |
|||
<tree> |
|||
<field name="name" /> |
|||
<field name="name_inverse" /> |
|||
<field name="contact_type_left" /> |
|||
<field name="contact_type_right" /> |
|||
<field name="allow_self" /> |
|||
<field name="is_symmetric" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<record id="form_res_partner_relation_type" model="ir.ui.view"> |
|||
<field name="model">res.partner.relation.type</field> |
|||
<field type="xml" name="arch"> |
|||
<form> |
|||
<sheet> |
|||
<group> |
|||
<group string="Left side of relation" name="left"> |
|||
<field name="name" /> |
|||
<field name="contact_type_left" /> |
|||
<field name="partner_category_left" /> |
|||
</group> |
|||
<group |
|||
name="properties" |
|||
string="Properties" |
|||
colspan= "6" col="4" |
|||
> |
|||
<field name="allow_self" /> |
|||
<field name="is_symmetric" /> |
|||
<field name="handle_invalid_onchange" /> |
|||
string="Right side of relation" |
|||
name="right" |
|||
attrs="{'invisible': [('is_symmetric', '=', True)]}" |
|||
> |
|||
<field |
|||
name="name_inverse" |
|||
attrs="{'required': [('is_symmetric', '=', False)]}" |
|||
/> |
|||
<field name="contact_type_right" /> |
|||
<field name="partner_category_right" /> |
|||
</group> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
</group> |
|||
<group name="properties" string="Properties" colspan="6" col="4"> |
|||
<field name="allow_self" /> |
|||
<field name="is_symmetric" /> |
|||
<field name="handle_invalid_onchange" /> |
|||
</group> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue