diff --git a/addons/crm/__terp__.py b/addons/crm/__terp__.py
index 72222a00668..b2a40c822a6 100644
--- a/addons/crm/__terp__.py
+++ b/addons/crm/__terp__.py
@@ -61,6 +61,7 @@ between mails and Open ERP.""",
],
'update_xml': [
+ 'wizard/crm_send_email_view.xml',
'crm_wizard.xml',
'crm_view.xml',
'crm_action_rule_view.xml',
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index ebaa437ff41..d070009481f 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -363,6 +363,8 @@ class crm_case(osv.osv):
data['email'] = email or \
(case.user_id and case.user_id.address_id and \
case.user_id.address_id.email) or False
+ data['email_from'] = (case.user_id and case.user_id.address_id and \
+ case.user_id.address_id.email) or tools.config.get('email_from',False)
res = obj.create(cr, uid, data, context)
return True
_history = __history
@@ -549,6 +551,7 @@ class crm_case_history(osv.osv):
'description': fields.text('Description'),
'note': fields.function(_note_get, method=True, string="Description", type="text"),
'email': fields.char('Email', size=84),
+ 'email_from' : fields.char('From Email', size=84),
'log_id': fields.many2one('crm.case.log','Log',ondelete='cascade'),
}
crm_case_history()
diff --git a/addons/crm/crm_claims_view.xml b/addons/crm/crm_claims_view.xml
index f51f6890d0c..50c061121a1 100644
--- a/addons/crm/crm_claims_view.xml
+++ b/addons/crm/crm_claims_view.xml
@@ -150,22 +150,29 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/crm_fund_view.xml b/addons/crm/crm_fund_view.xml
index a78d5e3eeb6..6babca13272 100644
--- a/addons/crm/crm_fund_view.xml
+++ b/addons/crm/crm_fund_view.xml
@@ -149,21 +149,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
+ string="Add a CC"
+ name="%(crm.action_view_crm_email_add_cc_wizard)d"
+ icon="gtk-add" type="action"/>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/crm_helpdesk_view.xml b/addons/crm/crm_helpdesk_view.xml
index ec662885a04..42bb1e0c47c 100644
--- a/addons/crm/crm_helpdesk_view.xml
+++ b/addons/crm/crm_helpdesk_view.xml
@@ -97,21 +97,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
+ string="Add a CC"
+ name="%(crm.action_view_crm_email_add_cc_wizard)d"
+ icon="gtk-add" type="action"/>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index 40998528ff5..11ae3c89087 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -119,24 +119,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
+ string="Add a CC"
+ name="%(crm.action_view_crm_email_add_cc_wizard)d"
+ icon="gtk-add" type="action"/>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
index 4ce8c647c13..956cba3e2f3 100644
--- a/addons/crm/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -139,21 +139,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
+ string="Add a CC"
+ name="%(crm.action_view_crm_email_add_cc_wizard)d"
+ icon="gtk-add" type="action"/>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 908cdd6fa91..ffbe9efcc7a 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -2,11 +2,7 @@
-
-
-
-
-
+
crm.case.section.form
@@ -351,7 +347,11 @@
-
+
@@ -359,7 +359,10 @@
-
+
diff --git a/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py b/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py
index fb73bafdbe4..9db7e24acee 100755
--- a/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py
+++ b/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py
@@ -206,7 +206,7 @@ class email_parser(object):
# 'file_name':'file data',
# }
# }
-# #
+
def msg_body_get(self, msg):
message = {};
message['body'] = '';
@@ -215,7 +215,7 @@ class email_parser(object):
counter = 1;
def replace(match):
return ''
-
+
for part in msg.walk():
if part.get_content_maintype() == 'multipart':
continue
@@ -264,7 +264,7 @@ class email_parser(object):
body['body'] = body_data
data = {
- 'description': body['body'],
+# 'description': body['body'],
}
act = 'case_pending'
if 'state' in actions:
@@ -291,7 +291,7 @@ class email_parser(object):
self.rpc(self.model, act, [id])
self.rpc(self.model, 'write', [id], data)
- self.rpc(self.model, 'history', [id], 'Send', True, msg['From'], message['body'])
+ self.rpc(self.model, 'history', [id], 'Send', True, msg['From'], body['body'])
return id
def msg_send(self, msg, emails, priority=None):
@@ -318,11 +318,11 @@ class email_parser(object):
body = message['body']
act = 'case_open'
self.rpc(self.model, act, [id])
- body2 = '\n'.join(map(lambda l: '> '+l, (body or '').split('\n')))
- data = {
- 'description':body,
- }
- self.rpc(self.model, 'write', [id], data)
+ #body2 = '\n'.join(map(lambda l: '> '+l, (body or '').split('\n')))
+ #data = {
+ # 'description':body,
+ #}
+ #self.rpc(self.model, 'write', [id], data)
self.rpc(self.model, 'history', [id], 'Send', True, msg['From'], message['body'])
return id
@@ -375,7 +375,7 @@ class email_parser(object):
if __name__ == '__main__':
import sys, optparse
- parser = optparse.OptionParser( usage='usage: %prog [options]', version='%prog v1.0')
+ parser = optparse.OptionParser(usage='usage: %prog [options]', version='%prog v1.0')
group = optparse.OptionGroup(parser, "Note",
"This program parse a mail from standard input and communicate "
"with the Open ERP server for case management in the CRM module.")
diff --git a/addons/crm/wizard/__init__.py b/addons/crm/wizard/__init__.py
index 62be2041d98..405bd46076b 100644
--- a/addons/crm/wizard/__init__.py
+++ b/addons/crm/wizard/__init__.py
@@ -23,8 +23,7 @@ import crm_opportunity_wizard
import crm_lead_wizard
import crm_phonecall_wizard
-import wizard_crm_send_email
-import wizard_crm_new_send_email
+import crm_send_email
import wizard_history_event
diff --git a/addons/crm/wizard/crm_send_email.py b/addons/crm/wizard/crm_send_email.py
new file mode 100644
index 00000000000..3adf7694527
--- /dev/null
+++ b/addons/crm/wizard/crm_send_email.py
@@ -0,0 +1,226 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (). All Rights Reserved
+# $Id$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+from osv import osv, fields
+from tools.translate import _
+import base64
+import tools
+
+class crm_send_new_email(osv.osv_memory):
+ """ Sends new email for the case"""
+ _name = "crm.send.mail"
+ _description = "Case Send new email"
+
+ _columns = {
+ 'to' : fields.char('To', size=64, required=True),
+ 'cc' : fields.char('CC', size=128),
+ 'subject': fields.char('Subject', size=128, required=True),
+ 'text': fields.text('Message', required=True),
+ 'state': fields.selection([('done', 'Done'), ('pending', 'Pending'), ('unchanged', 'Unchanged')], string='State', required=True),
+ 'doc1': fields.binary("Attachment1"),
+ 'doc2': fields.binary("Attachment2"),
+ 'doc3': fields.binary("Attachment3"),
+ }
+
+ def action_cancel(self, cr, uid, ids, context=None):
+ """
+ Closes Phonecall to Opportunity form
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Phonecall to Opportunity's IDs
+ @param context: A standard dictionary for contextual values
+ """
+ return {'type':'ir.actions.act_window_close'}
+
+ def action_send(self, cr, uid, ids, context=None):
+ """ This sends an email to ALL the addresses of the selected partners.
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Phonecall to Opportunity's IDs
+ @param context: A standard dictionary for contextual values
+ """
+ if not context:
+ context = {}
+
+ if not context.get('model'):
+ raise osv.except_osv(_('Error'), _('Can not send mail!'))
+
+ model = context.get('model')
+ case_pool = self.pool.get(model)
+ res_id = context and context.get('active_id', False) or False
+
+ for data in self.read(cr, uid, ids, context=context):
+ attach = filter(lambda x: x, [data['doc1'], data['doc2'], data['doc3']])
+ attach = map(lambda x: x and ('Attachment'+str(attach.index(x)+1), base64.decodestring(x)), attach)
+
+ if context.get('mail', 'new') == 'new':
+ case = case_pool.browse(cr, uid, res_id)
+ else:
+ hist_obj = self.pool.get('crm.case.history')
+ hist = hist_obj.browse(cr, uid, res_id)
+ model = hist.log_id.model_id.model
+ model_pool = self.pool.get(model)
+ case = model_pool.browse(cr, uid, hist.log_id.res_id)
+ emails = [data['to']] + (data['cc'] or '').split(',')
+ emails = filter(None, emails)
+ body = data['text']
+
+ if case.user_id.signature:
+ body += '\n\n%s' % (case.user_id.signature)
+
+ case_pool._history(cr, uid, [case], _('Send'), history=True, email=data['to'], details=body)
+ email_from = (case.user_id and case.user_id.address_id and \
+ case.user_id.address_id.email) or tools.config.get('email_from',False)
+ flag = tools.email_send(
+ email_from,
+ emails,
+ data['subject'],
+ case_pool.format_body(body),
+ attach=attach,
+ reply_to=case.section_id.reply_to,
+ openobject_id=str(case.id),
+ )
+ if flag:
+ if data['state'] == 'unchanged':
+ pass
+ elif data['state'] == 'done':
+ case_pool.case_close(cr, uid, [case.id])
+ elif data['state'] == 'pending':
+ case_pool.case_pending(cr, uid, [case.id])
+ cr.commit()
+
+# Commented because form does not close due to raise
+# raise osv.except_osv(_('Email!'), ("Email Successfully Sent"))
+# else:
+# raise osv.except_osv(_('Warning!'), _("Email not sent !"))
+ return {}
+
+ def default_get(self, cr, uid, fields, context=None):
+ """
+ This function gets default values
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+
+ @return : default values of fields.
+ """
+ if not context:
+ context = {}
+
+ if not context.get('model'):
+ raise osv.except_osv(_('Error'), _('Can not send mail!'))
+
+ res = super(crm_send_new_email, self).default_get(cr, uid, fields, context=context)
+
+ if context.get('mail') == 'reply':
+ res.update(self.get_reply_defaults(cr, uid, fields, context=context))
+ return res
+
+ model = context.get('model')
+ mod_obj = self.pool.get(model)
+ res_id = context and context.get('active_ids', []) or []
+
+ for case in mod_obj.browse(cr, uid, res_id):
+ if 'to' in fields:
+ res.update({'to': case.email_from})
+ if 'subject' in fields:
+ res.update({'subject': '[%s] %s' %(str(case.id), case.name or '')})
+ if 'cc' in fields:
+ res.update({'cc': case.email_cc or ''})
+ if 'text' in fields:
+ res.update({'text': case.description or ''})
+ if 'state' in fields:
+ res.update({'state': 'pending'})
+ return res
+
+ def get_reply_defaults(self, cr, uid, fields, context=None):
+ """
+ This function gets default values for reply mail
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+
+ @return : default values of fields.
+ """
+ hist_obj = self.pool.get('crm.case.history')
+ res_ids = context and context.get('active_ids', []) or []
+ res = {}
+ for hist in hist_obj.browse(cr, uid, res_ids):
+ model = hist.log_id.model_id.model
+ model_pool = self.pool.get(model)
+ case = model_pool.browse(cr, uid, hist.log_id.res_id)
+ if 'to' in fields and hist.email:
+ res.update({'to': hist.email})
+ if 'text' in fields:
+ header = '-------- Original Message --------'
+ sender = 'From: %s' %(hist.email_from or tools.config.get('email_from',False))
+ to = 'To: %s' % (hist.email)
+ sentdate = 'Sent: %s' % (hist.date)
+ desc = '\n%s'%(hist.description)
+ original = [header, sender, to, sentdate, desc]
+ original = '\n'.join(original)
+ res.update({'text': '\n\n%s'%(original)})
+ if 'subject' in fields:
+ res.update({'subject': '[%s] %s' %(str(case.id), case.name or '')})
+ #if 'state' in fields:
+ # res.update({'state': 'pending'})
+ return res
+
+ def view_init(self, cr, uid, fields_list, context=None):
+ """
+ This function checks for precondition before wizard executes
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+
+ """
+ if not context:
+ context = {}
+
+ if not context.get('model'):
+ raise osv.except_osv(_('Error'), _('Can not send mail!'))
+ model = context.get('model')
+ mod_obj = self.pool.get(model)
+ if context.get('mail') == 'reply':
+ return True
+ if tools.config.get('email_from'):
+ return True
+
+ for case in mod_obj.browse(cr, uid, context.get('active_ids', [])):
+ if not case.user_id:
+ raise osv.except_osv(_('Error'), _('You must define a responsible user for this case in order to use this action!'))
+ if not case.user_id.address_id.email:
+ raise osv.except_osv(_('Warning!'), _("Please specify user's email address !"))
+
+ return True
+
+crm_send_new_email()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/wizard/crm_send_email_view.xml b/addons/crm/wizard/crm_send_email_view.xml
new file mode 100644
index 00000000000..ece20c89efd
--- /dev/null
+++ b/addons/crm/wizard/crm_send_email_view.xml
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+ crm.new.send.mail.form
+ crm.send.mail
+ form
+
+
+
+
+
+
+
+
+ Send New Mail
+ crm.send.mail
+ form
+ form
+
+ new
+
+
+
+
+
+
+ crm.mail.reply.form
+ crm.send.mail
+ form
+
+
+
+
+
+
+
+
+ Reply to last Mail
+ crm.send.mail
+ form
+ form
+
+ new
+
+
+
+
diff --git a/addons/crm/wizard/wizard_crm_new_send_email.py b/addons/crm/wizard/wizard_crm_new_send_email.py
deleted file mode 100644
index ef878f3249f..00000000000
--- a/addons/crm/wizard/wizard_crm_new_send_email.py
+++ /dev/null
@@ -1,135 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL (). All Rights Reserved
-# $Id$
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-from mx.DateTime import now
-
-import wizard
-import netsvc
-import ir
-import pooler
-import tools
-import base64
-from tools.translate import _
-
-
-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},
- '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(data.get('model'))
-
- case = case_pool.browse(cr,uid,data['ids'])[0]
- emails = [data['form']['to']] + (data['form']['cc'] or '').split(',')
- emails = filter(None, emails)
- body = data['form']['text']
- if case.user_id.signature:
- body += '\n\n%s' % (case.user_id.signature)
- case_pool._history(cr, uid, [case], _('Send'), history=True, email=data['form']['to'], details=body)
- flag = tools.email_send(
- case.user_id.address_id.email,
- emails,
- data['form']['subject'],
- case_pool.format_body(body),
- attach=attach,
- reply_to=case.section_id.reply_to,
- openobject_id=str(case.id),
- subtype="html"
- )
- 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(_('Email!'),("Email Successfully Sent"))
- else:
- raise wizard.except_wizard(_('Warning!'),_("Email not sent !"))
- return {}
-
-def _get_info(self, cr, uid, data, context):
- if not data['id']:
- return {}
-
- pool = pooler.get_pool(cr.dbname)
- case = pool.get(data.get('model')).browse(cr, uid, data['id'])
- if not case.user_id:
- raise wizard.except_wizard(_('Error'),_('You must define a responsible user for this case in order to use this action!'))
- if not case.user_id.address_id.email:
- raise wizard.except_wizard(_('Warning!'),_("Please specify user's email address !"))
-
- return {
- 'to': case.email_from,
- 'subject': case.name,
- 'cc': case.email_cc or ''
- }
-
-class wizard_send_mail(wizard.interface):
- states = {
- 'init': {
- 'actions': [_get_info],
- 'result': {'type': 'form', 'arch': email_send_form, 'fields': email_send_fields, 'state':[('end','Cancel','gtk-cancel'), ('send','Send Email','gtk-go-forward')]}
- },
- 'send': {
- 'actions': [_mass_mail_send],
- 'result': {'type': 'state', 'state':'end'}
- }
- }
-wizard_send_mail('crm.new.send.mail')
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/crm/wizard/wizard_crm_send_email.py b/addons/crm/wizard/wizard_crm_send_email.py
deleted file mode 100644
index 6501bf841ac..00000000000
--- a/addons/crm/wizard/wizard_crm_send_email.py
+++ /dev/null
@@ -1,103 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL (). All Rights Reserved
-# $Id$
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-from mx.DateTime import now
-
-import wizard
-import netsvc
-import ir
-import pooler
-import tools
-from tools.translate import _
-
-
-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}
-}
-
-# this sends an email to ALL the addresses of the selected partners.
-def _mass_mail_send(self, cr, uid, data, context):
- pool = pooler.get_pool(cr.dbname)
-
- hist_obj = pool.get('crm.case.history').browse(cr,uid,data['ids'])[0]
- model = hist_obj.log_id.model_id.model
- model_pool = pool.get(model)
- case = model_pool.browse(cr, uid, hist_obj.log_id.res_id)
- model_pool._history(cr, uid, [case], _('Send'), history=True, email=False)
- emails = [data['form']['to']] + (data['form']['cc'] or '').split(',')
- emails = filter(None, emails)
- body = data['form']['text']
- if case.user_id.signature:
- body += '\n\n%s' % (case.user_id.signature)
- tools.email_send(
- case.user_id.address_id.email,
- emails,
- data['form']['subject'],
- model_pool.format_body(body),
- reply_to=case.section_id.reply_to,
- openobject_id=str(case.id),
- subtype="html"
- )
- return {}
-
-def _get_info(self, cr, uid, data, context):
- if not data['id']:
- raise wizard.except_wizard(_('Error'),_('There is no mail to reply!'))
- pool = pooler.get_pool(cr.dbname)
- hist_obj = pool.get('crm.case.history').browse(cr,uid,data['ids'])[0]
- model = hist_obj.log_id.model_id.model
- model_pool = pool.get(model)
- case = model_pool.browse(cr, uid, hist_obj.log_id.res_id)
- if not case.email_from:
- raise wizard.except_wizard(_('Error'),_('You must put a Partner eMail to use this action!'))
- if not case.user_id:
- raise wizard.except_wizard(_('Error'),_('You must define a responsible user for this case in order to use this action!'))
- return {'to': case.email_from,'subject': '['+str(case.id)+'] '+case.name,'cc': case.email_cc or '', 'text': '> ' + hist_obj.description.replace('\n','\n> ')}
-
-class wizard_send_mail(wizard.interface):
- states = {
- 'init': {
- 'actions': [_get_info],
- 'result': {'type': 'form', 'arch': email_send_form, 'fields': email_send_fields, 'state':[('end','Cancel','gtk-cancel'), ('send','Send Email','gtk-go-forward')]}
- },
- 'send': {
- 'actions': [_mass_mail_send],
- 'result': {'type': 'state', 'state':'end'}
- }
- }
-wizard_send_mail('crm.send.mail')
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index 12cb02f659f..efd0e8438a0 100755
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -69,8 +69,8 @@ class hr_holidays_status(osv.osv):
_columns = {
'name' : fields.char('Name', size=64, required=True, translate=True),
'categ_id': fields.many2one('crm.case.categ', 'Meeting Category', domain="[('object_id.model', '=', 'crm.meeting')]", help='If you link this type of leave with a category in the CRM, it will synchronize each leave asked with a case in this category, to display it in the company shared calendar for example.'),
- 'color_name' : fields.selection([('red', 'Red'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color of the status', required=True, help='This color will be used in the leaves summary located in Reporting\Print Summary of Leaves'),
- 'limit' : fields.boolean('Allow to override Limit', help='If you thick this checkbox, the system will allow, for this section, the employees to take more leaves than the available ones.'),
+ 'color_name' : fields.selection([('red', 'Red'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color in Report', required=True, help='This color will be used in the leaves summary located in Reporting\Leaves by Departement'),
+ 'limit' : fields.boolean('Allow to Override Limit', help='If you thick this checkbox, the system will allow, for this section, the employees to take more leaves than the available ones.'),
'active' : fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the leave type without removing it."),
'max_leaves' : fields.function(_user_left_days, method=True, string='Maximum Leaves Allowed', help='This value is given by the sum of all holidays requests with a positive value.', multi='user_left_days'),
'leaves_taken' : fields.function(_user_left_days, method=True, string='Leaves Already Taken', help='This value is given by the sum of all holidays requests with a negative value.', multi='user_left_days'),
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index 765fdf34775..36b7f5c76ad 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -255,10 +255,10 @@
diff --git a/addons/hr_holidays/hr_holidays_wizard.xml b/addons/hr_holidays/hr_holidays_wizard.xml
index fc433a181e7..a747571c943 100644
--- a/addons/hr_holidays/hr_holidays_wizard.xml
+++ b/addons/hr_holidays/hr_holidays_wizard.xml
@@ -14,7 +14,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+ string="Add a CC"
+ name="%(crm.action_view_crm_email_add_cc_wizard)d"
+ icon="gtk-add" type="action"/>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/project_issue/project_issue_demo.xml b/addons/project_issue/project_issue_demo.xml
index 1134e57afce..8794992b440 100644
--- a/addons/project_issue/project_issue_demo.xml
+++ b/addons/project_issue/project_issue_demo.xml
@@ -1,8 +1,8 @@
-
@@ -18,6 +18,7 @@
+
@@ -37,6 +38,7 @@
+
@@ -53,7 +55,8 @@
-
+
+
@@ -71,6 +74,7 @@
+
@@ -87,6 +91,7 @@
+
@@ -104,6 +109,7 @@
+
@@ -121,6 +127,7 @@
+
@@ -138,6 +145,7 @@
+
@@ -147,7 +155,7 @@
-
+
@@ -155,6 +163,7 @@
+
@@ -163,7 +172,7 @@
-
+
@@ -171,6 +180,7 @@
+
@@ -180,7 +190,7 @@
-
+
@@ -188,6 +198,7 @@
+
@@ -197,7 +208,7 @@
-
+
@@ -205,6 +216,7 @@
+
@@ -215,7 +227,7 @@
-
+
@@ -223,6 +235,7 @@
+
@@ -233,7 +246,7 @@
-
+
@@ -243,6 +256,7 @@
+
@@ -252,7 +266,7 @@
-
+
@@ -260,6 +274,7 @@
+
@@ -269,7 +284,7 @@
-
+
@@ -277,6 +292,7 @@
+
@@ -286,6 +302,6 @@
-
+
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index b74e73efc8d..be1fe6a6644 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -104,21 +104,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
+ string="Add a CC"
+ name="%(crm.action_view_crm_email_add_cc_wizard)d"
+ icon="gtk-add" type="action"/>
+
+
+
+
+
+
+
+
+
+
+
+