diff options
| -rw-r--r-- | addons/hr_recruitment/hr_recruitment.py | 2 | ||||
| -rw-r--r-- | addons/hr_recruitment/hr_recruitment_view.xml | 2 | ||||
| -rw-r--r-- | addons/hr_recruitment/security/ir.model.access.csv | 2 | ||||
| -rw-r--r-- | addons/hr_recruitment/wizard/__init__.py | 1 | ||||
| -rw-r--r-- | addons/hr_recruitment/wizard/email_compose_message.py | 56 |
5 files changed, 4 insertions, 59 deletions
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index b4f8cf09437..7fde90dc8e9 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -31,6 +31,8 @@ import tools from tools.translate import _ from crm import wizard +wizard.mail_compose_message.SUPPORTED_MODELS.append('hr.applicant') + AVAILABLE_STATES = [ ('draft', 'New'), ('open', 'In Progress'), diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 63af6f029ee..7046fe535b7 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -164,7 +164,7 @@ <notebook colspan="4"> <page string="Details"> <group attrs="{'invisible': [('email_from', '=', False)]}"> - <field name="body" colspan="4" nolabel="1" height="250"/> + <field name="body_text" colspan="4" nolabel="1" height="250"/> <button colspan="4" string="Reply" name="%(mail.action_email_compose_message_wizard)d" context="{'mail.compose.message.mode':'reply', 'message_id':active_id}" diff --git a/addons/hr_recruitment/security/ir.model.access.csv b/addons/hr_recruitment/security/ir.model.access.csv index 706fd531fc5..96baaf9e278 100644 --- a/addons/hr_recruitment/security/ir.model.access.csv +++ b/addons/hr_recruitment/security/ir.model.access.csv @@ -3,7 +3,7 @@ "access_hr_recruitment_report","hr.recruitment.report","model_hr_recruitment_report","base.group_hr_manager",1,1,1,1 "access_hr_recruitment_stage_user","hr.recruitment.stage.user","model_hr_recruitment_stage","base.group_hr_user",1,1,1,1 "access_hr_recruitment_degree","hr.recruitment.degree","model_hr_recruitment_degree","base.group_hr_user",1,1,1,1 -"access_email_message_user","email.message.user","mail.model_email_message","base.group_hr_user",1,1,1,1 +"access_mail_message_user","mail.message.user","mail.model_mail_message","base.group_hr_user",1,1,1,1 "access_res_partner_hr_user","res.partner.user","base.model_res_partner","base.group_hr_user",1,1,1,1 "access_res_partner_address_hr_user","res.partner.address.user","base.model_res_partner_address","base.group_hr_user",1,1,1,1 "access_survey_hr_user","survey.hr.user","survey.model_survey","base.group_hr_user",1,1,1,0 diff --git a/addons/hr_recruitment/wizard/__init__.py b/addons/hr_recruitment/wizard/__init__.py index 607db0a93b4..acabd219857 100644 --- a/addons/hr_recruitment/wizard/__init__.py +++ b/addons/hr_recruitment/wizard/__init__.py @@ -23,7 +23,6 @@ import hr_recruitment_phonecall import hr_recruitment_create_partner_job import hr_recruitment_employee_hired -import email_compose_message # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_recruitment/wizard/email_compose_message.py b/addons/hr_recruitment/wizard/email_compose_message.py deleted file mode 100644 index b2890de02a6..00000000000 --- a/addons/hr_recruitment/wizard/email_compose_message.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) -# -# 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 <http://www.gnu.org/licenses/> -# -############################################################################## - -from osv import osv -from osv import fields -import tools - - -class email_compose_message(osv.osv_memory): - _inherit = 'mail.compose.message' - - def get_value(self, cr, uid, model, resource_id, context=None): - ''' - To get values of the resource_id for the model - @param model: Object - @param resource_id: id of a record for which values to be read - - @return: Returns a dictionary - ''' - if context is None: - context = {} - result = super(email_compose_message, self).get_value(cr, uid, model, resource_id, context=context) - if model == 'hr.applicant' and resource_id: - model_obj = self.pool.get(model) - data = model_obj.browse(cr, uid , resource_id, context) - result.update({ - 'subject' : data.name or False, - 'email_to' : data.email_from or False, - 'email_from' : data.user_id and data.user_id.address_id and data.user_id.address_id.email or False, - 'body_text' : '\n' + (tools.ustr(data.user_id.signature or '')), - 'email_cc' : tools.ustr(data.email_cc or ''), - 'model': model, - 'res_id': resource_id, - }) - return result - - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
