[FIX] email_template: partners ids are integers, not strings
authorChristophe Simonis <christophe@kn.gl>
Sun, 1 Jun 2014 08:52:02 +0000 (10:52 +0200)
committerChristophe Simonis <christophe@kn.gl>
Sun, 1 Jun 2014 08:52:02 +0000 (10:52 +0200)
addons/email_template/email_template.py

index 54fbf57..3f202ff 100644 (file)
@@ -487,7 +487,7 @@ class email_template(osv.osv):
         partner_to = values.pop('partner_to', '')
         if partner_to:
             # placeholders could generate '', 3, 2 due to some empty field values
-            tpl_partner_ids = [pid for pid in partner_to.split(',') if pid]
+            tpl_partner_ids = [int(pid) for pid in partner_to.split(',') if pid]
             values['recipient_ids'] += [(4, pid) for pid in self.pool['res.partner'].exists(cr, SUPERUSER_ID, tpl_partner_ids, context=context)]
 
         attachment_ids = values.pop('attachment_ids', [])