-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathcrm_view.xml
executable file
·112 lines (99 loc) · 4.24 KB
/
crm_view.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="crm_case_section_view_form" model="ir.ui.view">
<field name="name">crm.case.section.form</field>
<field name="model">crm.case.section</field>
<field name="inherit_id" ref="sales_team.crm_case_section_view_form" />
<field name="arch" type="xml">
<field name="active" position="after">
<field name="department_id" widget="selection"/>
</field>
</field>
</record>
<record id="crm_case_section_view_tree" model="ir.ui.view">
<field name="name">crm.case.section.tree</field>
<field name="model">crm.case.section</field>
<field name="inherit_id" ref="sales_team.crm_case_section_view_tree" />
<field name="arch" type="xml">
<xpath expr="/tree/field[@name='user_id']" position="after">
<field name="department_id"/>
</xpath>
</field>
</record>
<!-- CRM Lead Form View -->
<record model="ir.ui.view" id="crm_case_form_view_leads">
<field name="name">CRM - Leads Form</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_form_view_leads" />
<field name="arch" type="xml">
<xpath expr="/form/sheet/group/group[3]/field[@name='type']" position="after">
<field name="department_id" widget="selection"/>
</xpath>
</field>
</record>
<!-- CRM Lead Tree View -->
<record model="ir.ui.view" id="crm_case_tree_view_leads">
<field name="name">Leads</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_tree_view_leads" />
<field name="arch" type="xml">
<xpath expr="/tree/field[@name='user_id']" position="after">
<field name="department_id" />
</xpath>
</field>
</record>
<record id="view_crm_case_leads_filter" model="ir.ui.view">
<field name="name">CRM - Leads Search</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.view_crm_case_leads_filter" />
<field name="arch" type="xml">
<xpath expr="/search/field[@name='section_id']" position="before">
<field name="department_id" widget="selection"/>
</xpath>
<xpath expr="/search/group/filter[@string='Salesperson']" position="after">
<filter string="Department" domain="[]" context="{'group_by':'department_id'}"/>
</xpath>
</field>
</record>
<!-- Opportunities Form View -->
<record model="ir.ui.view" id="crm_case_form_view_oppor">
<field name="name">Opportunities</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_form_view_oppor" />
<field name="arch" type="xml">
<xpath expr="/form/sheet/group/group[3]/div/field[@name='section_id']" position="attributes">
<attribute name="on_change">onchange_section_id(section_id)</attribute>
</xpath>
<xpath expr="/form/sheet/group/group[3]/div" position="after">
<field name="department_id" widget="selection"/>
</xpath>
</field>
</record>
<!-- Opportunities Tree View -->
<record model="ir.ui.view" id="crm_case_tree_view_oppor">
<field name="name">Opportunities Tree</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_tree_view_oppor" />
<field name="arch" type="xml">
<xpath expr="/tree/field[@name='user_id']" position="after">
<field name="department_id" />
</xpath>
</field>
</record>
<!-- Opportunities Search View -->
<record id="view_crm_case_opportunities_filter" model="ir.ui.view">
<field name="name">CRM - Opportunities Search</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.view_crm_case_opportunities_filter" />
<field name="arch" type="xml">
<xpath expr="/search/field[@name='section_id']" position="before">
<field name="department_id" widget="selection"/>
</xpath>
<xpath expr="/search/group/filter[@string='Salesperson']" position="after">
<filter string="Department" domain="[]" context="{'group_by':'department_id'}"/>
</xpath>
</field>
</record>
</data>
</openerp>