[IMP] mail installs
authorFabien Pinckaers <fp@tinyerp.com>
Fri, 17 Aug 2012 11:24:18 +0000 (13:24 +0200)
committerFabien Pinckaers <fp@tinyerp.com>
Fri, 17 Aug 2012 11:24:18 +0000 (13:24 +0200)
bzr revid: fp@tinyerp.com-20120817112418-037118wnayik229c

addons/mail/data/mail_demo.xml
addons/mail/mail_message.py
addons/mail/mail_thread.py

index e3d7c2a..f69fd1b 100644 (file)
@@ -6,38 +6,31 @@
             <field name="subject">Internal company announce</field>
             <field name="model">mail.group</field>
             <field name="res_id" ref="group_all_employees"/>
-            <field name="content_subtype">html</field>
-            <field name="body_html"><![CDATA[Your monthly meal vouchers arrived. You can get them at Christine's office.
+            <field name="body"><![CDATA[Your monthly meal vouchers arrived. You can get them at Christine's office.
 This month you also have 250 EUR of eco-checks for all employees that worked with us since 1 year minimum.]]></field>
             <field name="type">comment</field>
-            <field name="user_id" ref="base.user_root"/>
         </record>
 
         <record id="message_blogpost0_comment0" model="mail.message">
             <field name="model">mail.group</field>
             <field name="res_id" ref="group_all_employees"/>
-            <field name="content_subtype">html</field>
-            <field name="body_html"><![CDATA[Great.]]></field>
+            <field name="body"><![CDATA[Great.]]></field>
             <field name="parent_id" ref="message_blogpost0"/>
             <field name="type">comment</field>
-            <field name="user_id" ref="base.user_root"/>
         </record>
 
         <record id="message_blogpost0_comment1" model="mail.message">
             <field name="model">mail.group</field>
             <field name="res_id" ref="group_all_employees"/>
-            <field name="content_subtype">html</field>
-            <field name="body_html"><![CDATA[Yes, that's a good news.]]></field>
+            <field name="body"><![CDATA[Yes, that's a good news.]]></field>
             <field name="parent_id" ref="message_blogpost0"/>
             <field name="type">comment</field>
-            <field name="user_id" ref="base.user_demo"/>
         </record>
 
         <record id="message_blogpost0_comment2" model="mail.message">
             <field name="model">mail.group</field>
             <field name="res_id" ref="group_all_employees"/>
-            <field name="content_subtype">html</field>
-            <field name="body_html"><![CDATA[Sure: Curabitur tempor bibendum diam, et euismod ante rutrum vel.
+            <field name="body"><![CDATA[Sure: Curabitur tempor bibendum diam, et euismod ante rutrum vel.
 
 In quis purus neque. Integer sodales dolor eu elit fringilla blandit. Maecenas lacus nisi, facilisis sit amet viverra eu, tristique vel augue.
 Donec viverra congue dui eu blandit. In lacinia molestie nulla, ut sagittis risus feugiat eu.
@@ -45,7 +38,6 @@ Donec viverra congue dui eu blandit. In lacinia molestie nulla, ut sagittis risu
 Check the file in attachment for more information !  (third comment)]]></field>
             <field name="parent_id" ref="message_blogpost0"/>
             <field name="type">comment</field>
-            <field name="user_id" ref="base.user_root"/>
         </record>
 
         <record model="ir.config_parameter" id="user_mail_alias">
index 3d6d8bf..a74cc3c 100644 (file)
@@ -177,8 +177,6 @@ class mail_message(osv.Model):
             notification_obj = self.pool.get('mail.notification')
             modobj = self.pool.get(values.get('model'))
             follower_notify = []
-            print values.get('res_id'), '**'
-            print modobj.browse(cr, uid, values.get('res_id'), context=context)
             for follower in modobj.browse(cr, uid, values.get('res_id'), context=context).message_follower_ids:
                 if follower.id <> uid:
                     follower_notify.append(follower.id)
index c9fad98..d66d3d1 100644 (file)
@@ -110,7 +110,7 @@ class mail_thread(osv.Model):
         'message_is_follower': fields.function(_get_is_follower,
             type='boolean', string='Is a Follower'),
         'message_follower_ids': fields.many2many('res.partner', 'mail_subscription', 'res_id', 'partner_id',
-            domain=lambda self: [('res_model','=',self._name)],
+            # FP Note: implement this domain=lambda self: [('res_model','=',self._name)],
             string='Followers'),
         'message_ids': fields.one2many('mail.message', 'res_id',
             domain=lambda self: [('model','=',self._name)],