11
11
<field name="res_model">crm.case.categ</field>
12
12
<field name="view_type">form</field>
13
13
<field name="view_id" ref="crm.crm_case_categ_tree-view"/>
14
<field name="domain">[('object_id.model', '=', 'crm.phonecall')]</field>
15
<field name="context">{'object_id':'crm.phonecall'}</field>
14
<field name="domain">[('object_id.model', '=', 'crm.phonecall')]</field>
15
<field name="context">{'object_id':'crm.phonecall'}</field>
18
18
<menuitem action="crm_phonecall_categ_action" id="menu_crm_case_phonecall-act" parent="crm.menu_crm_case_categ"/>
19
# ------------------------------------------------------
21
# ------------------------------------------------------
22
<record id="crm_phonecall_stage_act" model="ir.actions.act_window">
23
<field name="name">Phonecall Stages</field>
24
<field name="res_model">crm.case.stage</field>
25
<field name="view_type">form</field>
26
<field name="view_id" ref="crm.crm_case_stage_tree"/>
27
<field name="domain">[('object_id.model', '=', 'crm.phonecall')]</field>
28
<field name="context">{'object_id':'crm.phonecall'}</field>
30
<menuitem action="crm_phonecall_stage_act" id="menu_crm_phonecall_stage_act" parent="crm.menu_crm_case_stage"/>
20
# ------------------------------------------------------
22
# ------------------------------------------------------
23
<record id="crm_phonecall_resource_act" model="ir.actions.act_window">
24
<field name="name">Phonecall Resource Type</field>
25
<field name="res_model">crm.case.resource.type</field>
26
<field name="view_type">form</field>
27
<field name="view_id" ref="crm.crm_case_resource_type_tree"/>
28
<field name="domain">[('object_id.model', '=', 'crm.phonecall')]</field>
29
<field name="context">{'object_id':'crm.phonecall'}</field>
31
<menuitem action="crm_phonecall_resource_act" id="menu_crm_phonecall_resource_act" parent="crm.menu_crm_case_resource_type"/>
32
34
# ------------------------------------------------------
39
41
<field name="model">crm.phonecall</field>
40
42
<field name="type">tree</field>
41
43
<field name="arch" type="xml">
42
<tree string="Phone Calls" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
43
<field name="date" string="Date"/>
44
<field name="name" string="Call Summary"/>
45
<field name="partner_id" string="Partner"/>
46
<field name="partner_address_id" string="Contact"/>
47
<field name="opportunity_id"/>
48
<button string="Opportunity" name="%(wizard_crm_phonecall_opportunity_set)d" type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
49
<button string="Meeting"
50
name="%(wizard_crm_phonecall_meeting_set)d" type="action" />
55
<record model="ir.ui.view" id="crm_case_phone_incomming_tree_view">
56
<field name="name">CRM - Phone Calls Tree</field>
57
<field name="model">crm.phonecall</field>
58
<field name="type">tree</field>
59
<field name="arch" type="xml">
60
<tree string="Phone Calls" editable="bottom" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
61
<field name="date" string="Date"/>
62
<field name="name" string="Call Summary"/>
63
<field name="partner_id" string="Partner"/>
64
<field name="partner_address_id" string="Contact"/>
66
<field name="opportunity_id"/>
67
<button string="Opportunity" name="%(wizard_crm_phonecall_opportunity_set)d" type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
68
<button string="Meeting"
69
name="%(wizard_crm_phonecall_meeting_set)d" type="action" />
44
<tree string="Phone Calls" colors="grey:state in ('cancel','done');blue:state in ('pending',)">
45
<field name="date" string="Date"/>
46
<field name="name" string="Call Summary"/>
47
<field name="partner_id" string="Partner"/>
48
<field name="partner_contact"/>
49
<field name="partner_phone"/>
50
<field name="user_id"/>
51
<button string="Opportunity"
52
name="%(wizard_crm_phonecall_opportunity_set)d"
53
states="draft,open,pending"
54
type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
55
<button string="Meeting"
56
states="draft,open,pending"
57
name="%(wizard_crm_phonecall_meeting_set)d" type="action" />
59
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
60
<button name="case_close" string="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
61
<button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-media-pause"/>
62
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
77
69
<field name="model">crm.phonecall</field>
78
70
<field name="type">form</field>
79
71
<field name="arch" type="xml">
80
<form string="Phone Call">
81
<group colspan="4" col="4">
82
<field name="name" string="Subject" />
83
<field name="date" string="Planned Date" />
84
<field name="partner_phone" />
85
<field name="duration" />
87
<group col="7" colspan="4">
88
<label string="" colspan="2" />
89
<button string="Schedule a Meeting"
90
name="%(wizard_crm_phonecall_meeting_set)d" icon="gtk-redo"
92
<button string="Convert to Opportunity"
93
name="%(wizard_crm_phonecall_opportunity_set)d"
94
icon="gtk-index" type="action"
95
attrs="{'invisible':[('opportunity_id','!=',False)]}" />
96
<button string="Convert to Partner"
98
name="%(wizard_crm_phonecall_partner_create)d"
100
attrs="{'invisible':[('partner_id','!=',False)]}" />
102
<group colspan="4" col="4">
103
<notebook colspan="4">
104
<page string="General">
105
<separator colspan="4" string="Communication" />
106
<field name="partner_id" />
107
<field name="partner_address_id" string="Contact" />
108
<field name="partner_mobile" />
109
<separator colspan="4" string="Status and Categarization" />
110
<group colspan="4" col="6">
111
<field name="user_id" string="Assigned to" select="2" />
112
<field name="section_id" colspan="1" widget="selection" />
113
<field name="opportunity_id"
114
on_change="onchange_case_id(case_id, name, partner_id)"
115
context="{'default_name':name,'default_section_id':section_id,'default_user_id':user_id,'default_duration':duration,
116
'default_partner_id':partner_id,'default_partner_address_id':partner_address_id,'default_partner_phone':partner_phone,
117
'default_partner_mobile':partner_mobile,'default_categ_id':categ_id}" />
119
<field name="priority" />
120
<field name="active" string="Reminder" />
122
<separator string="Description" colspan="4" />
123
<field name="description" nolabel="1" colspan="4" />
124
<separator colspan="4" />
125
<group col="8" colspan="4">
126
<field name="state" select="1" />
127
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
128
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
129
<button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-undo"/>
130
<button name="case_close" string="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
131
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
72
<form string="Phone Call">
73
<group colspan="4" col="7">
74
<field name="name" string="Call Summary"/>
75
<field name="date" string="Planned Date"/>
76
<field name="user_id"/>
77
<button string="Schedule a Meeting"
78
name="%(wizard_crm_phonecall_meeting_set)d"
83
<field name="partner_phone"/>
84
<field name="duration"/>
85
<field name="section_id" colspan="1" widget="selection" />
87
<button string="Convert to Opportunity"
88
name="%(wizard_crm_phonecall_opportunity_set)d"
89
icon="gtk-index" type="action"
90
attrs="{'invisible':[('opportunity_id','!=',False)]}" />
92
<group col="3" colspan="2">
93
<separator colspan="3" string="Contacts" />
94
<field name="partner_id" />
95
<button string="Create a Partner"
97
name="%(wizard_crm_phonecall_partner_create)d"
99
attrs="{'invisible':[('partner_id','!=',False)]}" />
101
<field name="partner_address_id" string="Contact" />
103
<field name="partner_mobile" />
105
<group col="2" colspan="2">
106
<separator colspan="2" string="Categorization" />
107
<field name="priority"/>
108
<field name="opportunity_id"/>
110
<separator string="Description" colspan="4" />
111
<field name="description" nolabel="1" colspan="4" />
112
<separator colspan="4" />
113
<group col="8" colspan="4">
114
<field name="state" select="1" />
115
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
116
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
117
<button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-undo"/>
118
<button name="case_close" string="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
119
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
158
141
<field name="type">search</field>
159
142
<field name="arch" type="xml">
160
143
<search string="Search Phonecalls">
161
<group col="6" colspan="1">
162
<filter icon="gtk-home" string=" Today "
164
domain="[('date::date','=',time.strftime('%%Y-%%m-%%d'))]"
165
help="Todays's Phonecalls"
167
<filter icon="gtk-media-rewind"
168
string=" 7 Days " separator="1"
169
help="Phonecalls during last 7 days"
170
domain="[('date','<', time.strftime('%%Y-%%m-%%d')), ('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
144
<filter icon="gtk-home" string="Today"
145
domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')), ('date','>=',datetime.strftime('%%Y-%%m-%%d 00:00:00'))]"
146
help="Todays's Phonecalls"
148
<filter icon="gtk-media-rewind"
150
help="Phonecalls during last 7 days"
151
domain="[('date','<', time.strftime('%%Y-%%m-%%d')), ('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
153
<separator orientation="vertical"/>
154
<field name="name" string="Call Summary"/>
155
<field name="partner_id"/>
156
<field name="user_id" widget="selection">
157
<filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My Phonecalls" default="1"/>
158
<filter icon="terp-partner" domain="[('user_id','=',False)]" help="Unassigned Phonecalls"/>
161
<filter icon="gtk-index" domain="[('state','in',('open','draft' ))]" help="Current" default="1"/>
163
<field name="section_id" default="context.get('section_id', False)" select="1" widget="selection" string="Section">
164
<filter icon="terp-crm"
165
domain="[('section_id','=',context.get('section_id',False))]"
169
<group expand="1" string="Group By..." colspan="4">
170
<filter string="Partner" icon="terp-crm" domain="[]" context="{'group_by':'partner_id'}"/>
171
<filter string="Responsible" icon="terp-crm" domain="[]" context="{'group_by':'user_id'}"/>
172
<separator orientation="vertical"/>
173
<filter string="Creation" icon="terp-project" domain="[]" context="{'group_by':'create_date'}"/>
174
<filter string="Date" icon="terp-project" domain="[]" context="{'group_by':'date'}"/>
173
<separator orientation="vertical"/>
174
<group col="6" colspan="2">
175
<field name="name" select='1' string="Subject"/>
176
<field name="user_id" select="1" widget="selection">
177
<filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My Phonecalls" default="1"/>
179
<field name="state" select="1">
180
<filter icon="gtk-index" domain="[('state','in',('open','draft' ))]" help="Current " default="1"/>
182
<field name="section_id" default="context.get('section_id', False)" select="1" widget="selection" string="Section">
183
<filter icon="terp-crm"
184
domain="[('section_id','=',context.get('section_id',False))]"