[FIX] Chatter: fixed suggested recipients, when having no email, unchecking the box...
authorThibault Delavallée <tde@openerp.com>
Fri, 24 May 2013 14:42:24 +0000 (16:42 +0200)
committerThibault Delavallée <tde@openerp.com>
Fri, 24 May 2013 14:42:24 +0000 (16:42 +0200)
bzr revid: tde@openerp.com-20130524144224-wbi1o27regxed7mn

addons/mail/static/src/js/mail.js
addons/mail/static/src/xml/mail.xml

index f3e762d..1e58dc4 100644 (file)
@@ -850,9 +850,9 @@ openerp.mail = function (session) {
 
         on_checked_recipient: function (event) {
             var $input = $(event.target);
-            var email = $input.attr("data");
+            var full_name = $input.attr("data");
             _.each(this.recipients, function (recipient) {
-                if (recipient.email_address == email) {
+                if (recipient.full_name == full_name) {
                     recipient.checked = $input.is(":checked");
                 }
             });
index ab82d65..f500494 100644 (file)
         <div class="oe_recipients" t-if="!widget.is_log">
             <t t-foreach='widget.recipients' t-as='recipient'>
                 <label t-attf-title="Add as recipient and follower (reason: #{recipient.reason})">
-                    <input type="checkbox" t-att-checked="recipient.checked ? 'checked' : undefined" t-att-data="recipient.email_address"/>
+                    <input type="checkbox" t-att-checked="recipient.checked ? 'checked' : undefined" t-att-data="recipient.full_name"/>
                     <t t-raw="recipient.name"/> 
                     <t t-if="recipient.email_address">(<t t-raw="recipient.email_address"/>)</t>
                     <t t-if="!recipient.email_address">(no email address)</t>