diff --git a/addons/crm/__terp__.py b/addons/crm/__terp__.py
index 0e3fef9603a..ef080317f53 100644
--- a/addons/crm/__terp__.py
+++ b/addons/crm/__terp__.py
@@ -47,9 +47,9 @@ between mails and Open ERP.""",
'depends': ['base'],
'init_xml': ['crm_data.xml'],
'update_xml': [
- 'crm_view.xml',
- 'crm_report.xml',
'crm_wizard.xml',
+ 'crm_view.xml',
+ 'crm_report.xml',
'security/crm_security.xml',
'security/ir.model.access.csv'
],
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
old mode 100644
new mode 100755
index b0f85a9e52a..673b14fe65d
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -42,8 +42,8 @@ MAX_LEVEL = 15
AVAILABLE_STATES = [
('draft','Draft'),
('open','Open'),
- ('cancel', 'Cancel'),
- ('done', 'Close'),
+ ('cancel', 'Cancelled'),
+ ('done', 'Closed'),
('pending','Pending')
]
@@ -74,7 +74,9 @@ class crm_case_section(osv.osv):
'reply_to': fields.char('Reply-To', size=64, help="The email address put in the 'Reply-To' of all emails sent by Open ERP about cases in this section"),
'parent_id': fields.many2one('crm.case.section', 'Parent Section'),
'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Child Sections'),
- "gateway_ids" : fields.one2many("crm.email.gateway",'section_id',"Email Gateway")
+ "gateway_ids" : fields.one2many("crm.email.gateway",'section_id',"Email Gateway"),
+ 'calendar' : fields.boolean('Calendar', help='Allow to show calendar'),
+
}
_defaults = {
'active': lambda *a: 1,
@@ -1037,5 +1039,43 @@ class crm_email_history(osv.osv):
_order = 'id desc'
crm_email_history()
+
+class crm_email_add_cc_wizard(osv.osv_memory):
+ _name = "crm.email.add.cc"
+ _description = "Email Add CC"
+ _columns = {
+ 'name': fields.selection([('user','User'),('partner','Partner'),('email','Email Address')], 'Send to', required=True),
+ 'user_id': fields.many2one('res.users',"User"),
+ 'partner_id': fields.many2one('res.partner',"Partner"),
+ 'email': fields.char('Email', size=32),
+ }
+
+ def change_email(self, cr, uid, ids, user, partner):
+ if (not partner and not user):
+ return {'value':{'email': False}}
+ email = False
+ if partner:
+ addr = self.pool.get('res.partner').address_get(cr, uid, [partner], ['contact'])
+ if addr:
+ email = self.pool.get('res.partner.address').read(cr, uid,addr['contact'] , ['email'])['email']
+ elif user:
+ addr = self.pool.get('res.users').read(cr, uid, user, ['address_id'])['address_id']
+ if addr:
+ email = self.pool.get('res.partner.address').read(cr, uid,addr[0] , ['email'])['email']
+ return {'value':{'email': email}}
+
+
+ def add_cc(self, cr, uid, ids, context={}):
+ email = self.read(cr, uid, ids[0])['email']
+ if not context:
+ return {}
+ history_line = self.pool.get('crm.case.history').browse(cr, uid, context['active_id'])
+ crm_case = self.pool.get('crm.case')
+ case_id = history_line.log_id.case_id.id
+ crm_case.write(cr, uid, case_id, {'email_cc' : email})
+ return {}
+
+crm_email_add_cc_wizard()
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
old mode 100644
new mode 100755
index e9b23b8b50d..7c054364583
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -3,6 +3,7 @@
+
@@ -37,8 +38,11 @@
-
-
+
+
+
+
+
@@ -234,7 +238,39 @@
+
+
+ Add CC
+ crm.email.add.cc
+ form
+
+
+
+
+
+ Add CC
+ ir.actions.act_window
+ crm.email.add.cc
+ form
+ form
+ new
+
+
crm.case.log.tree
@@ -380,10 +416,14 @@
@@ -448,7 +487,6 @@
form
tree,form,calendar
[('user_id','=',uid)]
-
@@ -458,7 +496,6 @@
form
tree,form,calendar
[('user_id','=',uid),('state','<>','done'),('state','<>','cancel'),('state','<>','pending')]
-
diff --git a/addons/crm/crm_wizard.xml b/addons/crm/crm_wizard.xml
index 9e96530a782..1227f273fd3 100644
--- a/addons/crm/crm_wizard.xml
+++ b/addons/crm/crm_wizard.xml
@@ -6,9 +6,8 @@
-
-
+ id="wizard_crm_case_section_fetchmail"/>
+
diff --git a/addons/crm/wizard/wizard_crm_new_send_email.py b/addons/crm/wizard/wizard_crm_new_send_email.py
index b905d31aa8e..330096c8373 100644
--- a/addons/crm/wizard/wizard_crm_new_send_email.py
+++ b/addons/crm/wizard/wizard_crm_new_send_email.py
@@ -27,6 +27,7 @@ import netsvc
import ir
import pooler
import tools
+import base64
from tools.translate import _
@@ -39,17 +40,35 @@ email_send_form = '''
+
+
+
+
+
+
+
+
+
'''
email_send_fields = {
'to': {'string':"To", 'type':'char', 'size':64, 'required':True},
'cc': {'string':"CC", 'type':'char', 'size':128,},
'subject': {'string':'Subject', 'type':'char', 'size':128, 'required':True},
- 'text': {'string':'Message', 'type':'text_tag', 'required':True}
+ 'text': {'string':'Message', 'type':'text_tag', 'required':True},
+ 'state':{'string':'State', 'type':'selection', 'selection':[('done','Done'),('pending','Pending'),('unchanged','Unchanged')]},
+ 'doc1' : {'string':"Attachment1", 'type':'binary'},
+ 'doc2' : {'string':"Attachment2", 'type':'binary'},
+ 'doc3' : {'string':"Attachment3", 'type':'binary'},
+ 'state' : {'string':"Set State to", 'type':'selection', 'required' : True, 'default' :'done',\
+ 'selection': [('unchanged','Unchanged'),('done','Done'),('pending','Pending')]},
}
# this sends an email to ALL the addresses of the selected partners.
def _mass_mail_send(self, cr, uid, data, context):
+ attach = filter(lambda x: x, [data['form']['doc1'], data['form']['doc2'], data['form']['doc3']])
+ attach = map(lambda x: x and ('Attachment'+str(attach.index(x)+1), base64.decodestring(x)), attach)
+
pool = pooler.get_pool(cr.dbname)
case_pool=pool.get('crm.case')
@@ -62,16 +81,32 @@ def _mass_mail_send(self, cr, uid, data, context):
emails = [data['form']['to']] + (data['form']['cc'] or '').split(',')
emails = filter(None, emails)
body = data['form']['text']
+ if not case.user_id.address_id.email:
+ raise wizard.except_wizard(_('Warning!'),("Please specify user's email address"))
if case.user_id.signature:
body += '\n\n%s' % (case.user_id.signature)
- tools.email_send(
+ flag = tools.email_send(
case.user_id.address_id.email,
emails,
data['form']['subject'],
+ body,
case_pool.format_body(body),
+ attach=attach,
reply_to=case.section_id.reply_to,
tinycrm=str(case.id)
)
+ if flag:
+ if data['form']['state'] == 'unchanged':
+ pass
+ elif data['form']['state'] == 'done':
+ case_pool.case_close(cr, uid, data['ids'])
+ elif data['form']['state'] == 'pending':
+ case_pool.case_pending(cr, uid, data['ids'])
+ cr.commit()
+ raise wizard.except_wizard(_('Message!'),("Email Successfully Sent..!!"))
+
+ else:
+ raise wizard.except_wizard(_('Warning!'),("Email is not sent Successfully"))
return {}
def _get_info(self, cr, uid, data, context):
diff --git a/addons/crm_configuration/__terp__.py b/addons/crm_configuration/__terp__.py
index dd50d455600..ad223e81625 100644
--- a/addons/crm_configuration/__terp__.py
+++ b/addons/crm_configuration/__terp__.py
@@ -48,7 +48,8 @@ meetings, eso.
'crm_fund_view.xml',
'crm_claims_view.xml',
'crm_phonecall_view.xml',
- 'crm_report_view.xml'
+ 'crm_report_view.xml',
+ 'crm_helpdesk_view.xml'
],
'update_xml': ['security/ir.model.access.csv', 'process/crm_configuration_process.xml'],
'demo_xml': [],
diff --git a/addons/crm_configuration/crm_bugs_menu.xml b/addons/crm_configuration/crm_bugs_menu.xml
index 218acd0e420..ff61776e21d 100644
--- a/addons/crm_configuration/crm_bugs_menu.xml
+++ b/addons/crm_configuration/crm_bugs_menu.xml
@@ -34,7 +34,7 @@
ALL BUGS
-->
- All Bugs
+ Bugs
crm.case
form
tree,calendar
@@ -62,644 +62,6 @@
-
-
- Bugs Waiting Approval
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- Open Bugs
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- Bugs With Patches Waiting Approval
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- Bugs Not Fixed
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- Pending Bugs
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- Planned For Future Release
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- Waiting For Reporter Response
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- Old Bugs
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
- My Bugs
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- New Bug
- crm.case
- form
- form,tree
-
-
-
-
-
-
- form
-
-
-
-
-
- tree
-
-
-
-
-
-
- My Open Bugs
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- My Bugs With Patches
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- My Bugs Not Fixed
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
-
- All Feature Requests
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- New Feature Request
- crm.case
- form
- form,tree
-
-
-
-
-
-
- form
-
-
-
-
-
- tree
-
-
-
-
-
-
- Feature Requests Waiting Approval
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
- Open Feature Requests
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- Pending Feature Requests
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- Planned For Future Release
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- Waiting For Reporter Response
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- Old Feature Requests
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
diff --git a/addons/crm_configuration/crm_bugs_view.xml b/addons/crm_configuration/crm_bugs_view.xml
old mode 100644
new mode 100755
index a48c54de94c..f20b4761ab0
--- a/addons/crm_configuration/crm_bugs_view.xml
+++ b/addons/crm_configuration/crm_bugs_view.xml
@@ -23,19 +23,21 @@
-
-
+
-
+
+
+
+
@@ -76,16 +78,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
crm.case.leads.select
crm.case
search
-
-
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+ res.partner.crm.form.inherit
+ res.partner
+ form
+
+
+
+
+
+
+
diff --git a/addons/crm_configuration/crm_meeting_data.xml b/addons/crm_configuration/crm_meeting_data.xml
index 441cb45a0fc..086222c9f25 100644
--- a/addons/crm_configuration/crm_meeting_data.xml
+++ b/addons/crm_configuration/crm_meeting_data.xml
@@ -5,6 +5,7 @@
Meetings
Mtngs
+ True
diff --git a/addons/crm_configuration/crm_meeting_menu.xml b/addons/crm_configuration/crm_meeting_menu.xml
old mode 100644
new mode 100755
index 0f519b55a04..c5d8f30a911
--- a/addons/crm_configuration/crm_meeting_menu.xml
+++ b/addons/crm_configuration/crm_meeting_menu.xml
@@ -47,6 +47,7 @@
+
@@ -81,7 +82,7 @@
crm.case
calendar,tree,form,graph,gantt
-
+
@@ -112,33 +113,6 @@
-
- New Meeting
- crm.case
- form
- form,tree
-
-
-
-
-
-
- form
-
-
-
-
-
- tree
-
-
-
-
-
-
diff --git a/addons/crm_configuration/crm_meeting_view.xml b/addons/crm_configuration/crm_meeting_view.xml
old mode 100644
new mode 100755
index 1febc90046a..67ed305e864
--- a/addons/crm_configuration/crm_meeting_view.xml
+++ b/addons/crm_configuration/crm_meeting_view.xml
@@ -18,7 +18,11 @@
-
+
+
+
+
+
@@ -37,66 +41,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/addons/crm_configuration/crm_opportunity_menu.xml b/addons/crm_configuration/crm_opportunity_menu.xml
index 120ed288f92..e14614531c6 100644
--- a/addons/crm_configuration/crm_opportunity_menu.xml
+++ b/addons/crm_configuration/crm_opportunity_menu.xml
@@ -34,186 +34,6 @@
-
-
-
- All Open Opportunities
- crm.case
- tree,form,graph
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
- graph
-
-
-
-
-
-
-
- All Unassigned Opportunities
- crm.case
- tree,form,graph
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
- graph
-
-
-
-
-
-
-
-
- My Opportunities
- crm.case
- tree,form,graph
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
- graph
-
-
-
-
-
-
- Opportunity
- crm.case
- form
- form,tree
-
-
-
-
-
-
- form
-
-
-
-
-
- tree
-
-
-
-
-
-
- My Open Opportunities
- crm.case
- tree,form,graph
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
- graph
-
-
-
-
-
-
- My Pending Opportunities
- crm.case
- tree,form,graph
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
- graph
-
-
-
-
diff --git a/addons/crm_configuration/crm_opportunity_view.xml b/addons/crm_configuration/crm_opportunity_view.xml
index 0e30b8cd733..5a920ad1df2 100644
--- a/addons/crm_configuration/crm_opportunity_view.xml
+++ b/addons/crm_configuration/crm_opportunity_view.xml
@@ -6,6 +6,15 @@
# Opportunities
# ------------------------------------------------------
+
+
CRM - Opportunities Form
crm.case
@@ -25,8 +34,11 @@
-
-
+
+
+
+
+
@@ -99,10 +111,14 @@
+
crm.case.opportunities.select
crm.case
search
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
diff --git a/addons/crm_configuration/crm_phonecall_menu.xml b/addons/crm_configuration/crm_phonecall_menu.xml
index 16e9f552e52..1897c3c24ac 100644
--- a/addons/crm_configuration/crm_phonecall_menu.xml
+++ b/addons/crm_configuration/crm_phonecall_menu.xml
@@ -52,7 +52,7 @@
-
+
@@ -72,173 +72,6 @@
-
-
-
- New Incoming Call
- crm.case
- form
- tree
-
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
-
- Planned Calls
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-################################################################
-
- Outbound
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- New Outgoing Call
- crm.case
- form
- tree
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
-
- Planned Calls
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
-
-
- Calls Not Held
- crm.case
- form
- tree,calendar
-
-
-
-
-
-
-
- tree
-
-
-
-
-
- calendar
-
-
-
-
-
- form
-
-
-
-
diff --git a/addons/crm_configuration/crm_phonecall_view.xml b/addons/crm_configuration/crm_phonecall_view.xml
index 74b4f91de37..1a70b69ccf7 100644
--- a/addons/crm_configuration/crm_phonecall_view.xml
+++ b/addons/crm_configuration/crm_phonecall_view.xml
@@ -10,20 +10,17 @@
crm.case
tree
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
@@ -37,17 +34,18 @@
-
-
+
+
-
-
-
+
+
+
+
@@ -55,11 +53,14 @@
-
-
-
+
+
+
+
+
+
-
+
@@ -74,55 +75,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -148,71 +101,43 @@
search
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- crm.case.inbound.phonecalls.select
- crm.case
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- crm.case.outbound.phonecalls.select
- crm.case
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm_configuration/wizard/__init__.py b/addons/crm_configuration/wizard/__init__.py
index 7469c2ac483..d8995686cf8 100644
--- a/addons/crm_configuration/wizard/__init__.py
+++ b/addons/crm_configuration/wizard/__init__.py
@@ -24,4 +24,6 @@ import wizard_partner_create
import wizard_opportunity_set
import schedule_phone_call
import wizard_history_event
+import wizard_partner_opportunity
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_configuration/wizard/schedule_phone_call.py b/addons/crm_configuration/wizard/schedule_phone_call.py
index ca65352efd8..4d17a36455f 100644
--- a/addons/crm_configuration/wizard/schedule_phone_call.py
+++ b/addons/crm_configuration/wizard/schedule_phone_call.py
@@ -32,7 +32,7 @@ from tools.translate import _
case_form = """