[TYPO] Remove warning

bzr revid: jke@openerp.com-20131218160827-0bv1vxcux22p4ioa
This commit is contained in:
jke-openerp 2013-12-18 17:08:27 +01:00
parent 86b827113b
commit 1a3cb3dcf8
2 changed files with 12 additions and 11 deletions

View File

@ -230,11 +230,9 @@ class calendar_attendee(osv.osv):
ids = [ids]
for attendee in self.browse(cr, uid, ids, context=context):
print"_ZZZ_"
dummy,template_id = data_pool.get_object_reference(cr, uid, 'base_calendar', template_xmlid)
dummy,act_id = data_pool.get_object_reference(cr, uid, 'base_calendar', "view_crm_meeting_calendar")
body = template_pool.browse(cr, uid, template_id, context=context).body_html
print"_YYY_"
if attendee.email and email_from:
ics_file = self.get_ics_file(cr, uid, attendee.event_id, context=context)
local_context['att_obj'] = attendee
@ -243,7 +241,6 @@ class calendar_attendee(osv.osv):
local_context['dbname'] = cr.dbname
local_context['base_url'] = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url', default='http://localhost:8069', context=context)
vals = template_pool.generate_email(cr, uid, template_id, attendee.event_id.id, context=local_context)
print"_XXX_"
if ics_file:
vals['attachment_ids'] = [(0,0,{'name': 'invitation.ics',
'datas_fname': 'invitation.ics',
@ -255,20 +252,16 @@ class calendar_attendee(osv.osv):
if (vals['email_to']== attendee.partner_id.email):
vals['email_to'] = ''
vals['recipient_ids'] = [(4,attendee.partner_id.id),]
print"_AAA_"
if not attendee.partner_id.opt_out:
print"_FFF_"
print vals
if 'partner_to' in vals:
del vals['partner_to'] #hack between mail.mail and template.mail -> tde
mail_id.append(mail_pool.create(cr, uid, vals, context=context))
print"_GGG_"
print"_BBB_"
if mail_id:
try:
print"_CCC_"
res = mail_pool.send(cr, uid, mail_id, context=context)
print"_DDD_"
except Exception as e:
print e
@ -606,6 +599,8 @@ class calendar_alarm_manager(osv.osv):
vals['recipient_ids'] = [(4,attendee.partner_id.id),]
if not attendee.partner_id.opt_out:
if 'partner_to' in vals:
del vals['partner_to'] #hack between mail.mail and template.mail -> tde
mail_ids.append(mail_pool.create(cr, uid, vals, context=local_context))
if mail_ids:
try:

View File

@ -125,6 +125,12 @@
<field name="subject">${object.name}</field>
<field name="email_to" >${ctx['att_obj'].email}</field>
<field name="model_id" ref="base_calendar.model_crm_meeting"/>
<!--
<field name="email_to" >${(ctx['att_obj'].partner_id and ctx['att_obj'].partner_id.email and ctx['att_obj'].partner_id.email==ctx['att_obj'].email and '' or ctx['att_obj'].email|safe)}</field>
<field name="partner_to">${ctx['att_obj'].partner_id and ctx['att_obj'].partner_id.email and ctx['att_obj'].partner_id.email==ctx['att_obj'].email and ctx['att_obj'].partner_id.email or False }</field>
del vals['partner_to'] #Hack between email_template and mail_mail -> See tde
-->
<field name="auto_delete" eval="True"/>
<field name="body_html"><![CDATA[