[MERGE] purchase: ps review

bzr revid: qdp-launchpad@openerp.com-20121010184414-eys4z5k531qwx5ck
This commit is contained in:
Quentin (OpenERP) 2012-10-10 20:44:14 +02:00
commit a8c6c4e34a
2 changed files with 6 additions and 2 deletions

View File

@ -319,7 +319,7 @@ class email_template(osv.osv):
ext = "." + format
if not report_name.endswith(ext):
report_name += ext
attachments.append(report_name, result)
attachments.append((report_name, result))
# Add template attachments
for attach in template.attachment_ids:

View File

@ -81,7 +81,11 @@ class mail_compose_message(osv.TransientModel):
elif composition_mode == 'comment' and model and res_id:
vals = self.get_record_data(cr, uid, model, res_id, context=context)
elif composition_mode == 'mass_mail' and model and active_ids:
vals = {'model': model, 'res_id': res_id, 'content_subtype': 'html'}
if context.get('default_template_id'):
vals = self.pool.get('email.template').generate_email(cr, uid, context.get('default_template_id'), res_id, context=context)
vals.update({'content_subtype': 'html'})
else:
vals = {'model': model, 'res_id': res_id, 'content_subtype': 'html'}
else:
vals = {'model': model, 'res_id': res_id}
if composition_mode: