[MERGE] correction of backlog3
bzr revid: hmo@tinyerp.com-20110428092634-bghc3l69nxe6rxb4
This commit is contained in:
@@ -88,7 +88,8 @@ class email_compose_message(osv.osv_memory):
|
||||
template_pool = self.pool.get('email.template')
|
||||
model_pool = self.pool.get('ir.model')
|
||||
for record in self.browse(cr, uid, ids, context=context):
|
||||
model = model_pool.search(cr, uid, [('model','=', record.model)])[0]
|
||||
model = context.get('active_model', record.model or False)
|
||||
model = model_pool.search(cr, uid, [('model','=', model)])[0]
|
||||
model_name = model_pool.browse(cr, uid, model, context=context).name
|
||||
values = {
|
||||
'name': model_name,
|
||||
@@ -105,7 +106,7 @@ class email_compose_message(osv.osv_memory):
|
||||
'attachment_ids': [(6, 0, [att.id for att in record.attachment_ids])]
|
||||
}
|
||||
template_pool.create(cr, uid, values, context=context)
|
||||
return True
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
email_compose_message()
|
||||
|
||||
|
||||
@@ -306,6 +306,10 @@
|
||||
<field name="response" readonly="1"/>
|
||||
<field name="user_to_review_id"/>
|
||||
<field name="user_id" string="Interviewer"/>
|
||||
<button string="Send Reminder Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
icon="terp-mail-message-new" type="action" colspan="2"
|
||||
states="waiting_answer"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<separator string="State" colspan="4"/>
|
||||
@@ -329,6 +333,7 @@
|
||||
<field name="response" readonly="1" invisible="True"/>
|
||||
<button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response, 'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
|
||||
<button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done" icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0}" attrs="{'readonly':[('response','=',False)]}" />
|
||||
<button name="%(mail.action_email_compose_message_wizard)d" string="Send Reminder Email" icon="terp-mail-message-new" type="action" colspan="2" states="waiting_answer"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -401,23 +406,18 @@
|
||||
<field name="act_window_id" ref="action_hr_evaluation_interview_tree"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Email Compose message Action-->
|
||||
<record id="action_email_compose_message_menu_wizard" model="ir.actions.act_window">
|
||||
<field name="name">Send E-mail</field>
|
||||
<field name="res_model">email.compose.message</field>
|
||||
<field name="src_model">email.compose.message</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="context">{'email_model':'hr.evaluation.interview'}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Interview Requests" parent="menu_eval_hr" id="menu_open_hr_evaluation_interview_requests"
|
||||
action="action_hr_evaluation_interview_tree"/>
|
||||
<menuitem name="Evaluation Reminders" parent="menu_eval_hr" id="menu_eval_send_mail"
|
||||
action="action_email_compose_message_menu_wizard" sequence="45" groups="base.group_hr_manager"/>
|
||||
|
||||
<!-- Email Compose message Action-->
|
||||
<act_window
|
||||
id="evaluation_reminders" name="Evaluation Reminders"
|
||||
res_model="email.compose.message"
|
||||
src_model="hr.evaluation.interview"
|
||||
view_type="form" view_mode="form"
|
||||
target="new" multi="True"
|
||||
key2="client_action_multi"
|
||||
context="{'mass_mail':True}"/>
|
||||
|
||||
<!-- Evaluation Interviews Button on Employee Form -->
|
||||
<act_window
|
||||
|
||||
@@ -42,6 +42,8 @@ class email_compose_message(osv.osv_memory):
|
||||
context = {}
|
||||
result = super(email_compose_message, self).default_get(cr, uid, fields, context=context)
|
||||
vals = {}
|
||||
if context.get('mass_mail'):
|
||||
return result
|
||||
if context.get('active_model') and context.get('active_id') and not context.get('mail')=='reply':
|
||||
vals = self.get_value(cr, uid, context.get('active_model'), context.get('active_id'), context)
|
||||
|
||||
|
||||
@@ -49,5 +49,13 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Mass Mailing"
|
||||
res_model="email.compose.message"
|
||||
src_model="res.partner"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="base.action_partner_mass_mail"
|
||||
context="{'mass_mail':True}"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user