diff --git a/addons/event/event.py b/addons/event/event.py
index 7f0c77661e4..48946959551 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -334,7 +334,7 @@ class event_registration(osv.osv):
return self.write(cr, uid, ids, {'state': 'draft'}, context=context)
def confirm_registration(self, cr, uid, ids, context=None):
- self.message_append(cr, uid, ids,_('State set to open'),body_text= _('Open'))
+ self.message_append_note(cr, uid, ids, body=_('State set to open'))
return self.write(cr, uid, ids, {'state': 'open'}, context=context)
def create(self, cr, uid, vals, context=None):
@@ -364,13 +364,13 @@ class event_registration(osv.osv):
if today >= registration.event_id.date_begin:
values = {'state': 'done', 'date_closed': today}
self.write(cr, uid, ids, values)
- self.message_append(cr, uid, ids, _('State set to Done'), body_text=_('Done'))
+ self.message_append_note(cr, uid, ids, body=_('State set to Done'))
else:
raise osv.except_osv(_('Error!'),_("You must wait for the starting day of the event to do this action.") )
return True
def button_reg_cancel(self, cr, uid, ids, context=None, *args):
- self.message_append(cr, uid, ids,_('State set to Cancel'),body_text= _('Cancel'))
+ self.message_append_note(cr, uid, ids,body = _('State set to Cancel'))
return self.write(cr, uid, ids, {'state': 'cancel'})
def mail_user(self, cr, uid, ids, context=None):
diff --git a/addons/mail/mail_followers_view.xml b/addons/mail/mail_followers_view.xml
index 62e93430675..0637d4dc11e 100644
--- a/addons/mail/mail_followers_view.xml
+++ b/addons/mail/mail_followers_view.xml
@@ -12,7 +12,7 @@
-
+
@@ -24,7 +24,7 @@
10
-
+
diff --git a/addons/mail/mail_group.py b/addons/mail/mail_group.py
index 2c8b9450439..ba3ed292bf8 100644
--- a/addons/mail/mail_group.py
+++ b/addons/mail/mail_group.py
@@ -36,7 +36,7 @@ class mail_group(osv.Model):
"""
_description = 'Discussion group'
_name = 'mail.group'
- _inherit = ['mail.thread','ir.needaction']
+ _inherit = ['mail.thread','ir.needaction_mixin']
_inherits = {'mail.alias': 'alias_id', 'ir.ui.menu': 'menu_id'}
def _get_image(self, cr, uid, ids, name, args, context=None):
@@ -84,7 +84,7 @@ class mail_group(osv.Model):
help="Small-sized photo of the group. It is automatically "\
"resized as a 50x50px image, with aspect ratio preserved. "\
"Use this field anywhere a small image is required."),
- 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade",
+ 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
help="The email address associated with this group. New emails received will automatically "
"create new topics."),
}
diff --git a/addons/mail/mail_message_view.xml b/addons/mail/mail_message_view.xml
index c50e53c8e75..e7c4f9df494 100644
--- a/addons/mail/mail_message_view.xml
+++ b/addons/mail/mail_message_view.xml
@@ -10,7 +10,7 @@
-
+
@@ -28,10 +28,9 @@
-
+
-
@@ -40,14 +39,7 @@
-
-
-
-
-
-
-
-
+
@@ -60,9 +52,8 @@
20
-
-
-
+
+
@@ -76,9 +67,6 @@
-
@@ -88,31 +76,21 @@
-
-
-
+
- mail.message.form
- mail.message
+ mail.mail.form
+ mail.mail
- mail.message.search
- mail.message
+ mail.mail.search
+ mail.mail
@@ -203,8 +177,8 @@
-
-
+
+
diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py
index ab6ad324125..ec34bc221cb 100644
--- a/addons/mail/mail_thread.py
+++ b/addons/mail/mail_thread.py
@@ -835,9 +835,9 @@ class mail_thread(osv.Model):
msg_original = message.as_string() if isinstance(message, Message) \
else message
attachments.append((0, 0, {
- 'name':'email.msg',
+ 'name':'email.eml',
'datas': base64.b64encode(msg_original),
- 'datas_fname': 'email.msg',
+ 'datas_fname': 'email.eml',
'res_model': 'mail.message',
'description': _('original email'),
}))
diff --git a/addons/mail/res_partner.py b/addons/mail/res_partner.py
index 7ca33e94f01..6f1808c1612 100644
--- a/addons/mail/res_partner.py
+++ b/addons/mail/res_partner.py
@@ -45,5 +45,8 @@ class res_partner_mail(osv.Model):
help="Choose in which case you want to receive an email when you "\
"receive new feeds."),
}
+ _defaults = {
+ 'notification_email_pref': lambda *args: 'comment'
+ }
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/mail/res_users.py b/addons/mail/res_users.py
index 5a8c1b0412e..7f4d278d0c5 100644
--- a/addons/mail/res_users.py
+++ b/addons/mail/res_users.py
@@ -45,7 +45,6 @@ class res_users(osv.Model):
}
_defaults = {
- 'notification_email_pref': 'to_me',
'alias_domain': False, # always hide alias during creation
}
@@ -128,43 +127,6 @@ class res_users(osv.Model):
alias_pool.unlink(cr, uid, alias_ids, context=context)
return res
- # --------------------------------------------------
- # Wrappers on partner methods for Chatter
- # #FIXME: another branch holds a refactoring of mail.thread
- # that should help cleaning those wrappers
- # --------------------------------------------------
-
- #def message_append(self, cr, uid, threads, subject, body_text=None, body_html=None,
- # type='email', email_date=None, parent_id=False,
- # content_subtype='plain', state=None,
- # partner_ids=None, email_from=False, email_to=False,
- # email_cc=None, email_bcc=None, reply_to=None,
- # headers=None, message_id=False, references=None,
- # attachments=None, original=None, context=None):
- # for user in self.browse(cr, uid, threads, context=context):
- # user.partner_id.message_append(subject, body_text, body_html, type, email_date, parent_id,
- # content_subtype, state, partner_ids, email_from, email_to, email_cc, email_bcc, reply_to,
- # headers, message_id, references, attachments, original)
-
- #def message_read(self, cr, uid, ids, fetch_ancestors=False, ancestor_ids=None,
- # limit=100, offset=0, domain=None, context=None):
- # for user in self.browse(cr, uid, ids, context=context):
- # return user.partner_id.message_read(fetch_ancestors, ancestor_ids, limit, offset, domain)
-
- #def message_search(self, cr, uid, ids, fetch_ancestors=False, ancestor_ids=None,
- # limit=100, offset=0, domain=None, count=False, context=None):
- # for user in self.browse(cr, uid, ids, context=context):
- # return user.partner_id.message_search(fetch_ancestors, ancestor_ids, limit, offset, domain, count)
-
- #def message_subscribe(self, cr, uid, ids, user_ids = None, context=None):
- # for user in self.browse(cr, uid, ids, context=context):
- # return user.partner_id.message_subscribe(user_ids)
-
- #def message_unsubscribe(self, cr, uid, ids, user_ids = None, context=None):
- # for user in self.browse(cr, uid, ids, context=context):
- # return user.partner_id.message_unsubscribe(user_ids)
-
-
class res_users_mail_group(osv.Model):
""" Update of res.groups class
- if adding/removing users from a group, check mail.groups linked to
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index 86cf34df04c..a38564ef578 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -116,6 +116,7 @@ class mail_compose_message(osv.TransientModel):
'attachment_ids': fields.many2many('ir.attachment','email_message_send_attachment_rel', 'wizard_id', 'attachment_id', 'Attachments'),
'auto_delete': fields.boolean('Auto Delete', help="Permanently delete emails after sending"),
'filter_id': fields.many2one('ir.filters', 'Filters'),
+ 'body_html': fields.html('HTML Editor Body'),
}
def get_value(self, cr, uid, model, res_id, context=None):
diff --git a/addons/mail/wizard/mail_compose_message_view.xml b/addons/mail/wizard/mail_compose_message_view.xml
index c2d7420fe14..e1a1020b6b6 100644
--- a/addons/mail/wizard/mail_compose_message_view.xml
+++ b/addons/mail/wizard/mail_compose_message_view.xml
@@ -9,18 +9,14 @@
-
-
-
-
-
+
+
-
-
+
@@ -44,7 +40,7 @@
-
diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py
index e497f902dc2..aaf54d1ac2b 100644
--- a/addons/plugin/plugin_handler.py
+++ b/addons/plugin/plugin_handler.py
@@ -108,8 +108,7 @@ class plugin_handler(osv.osv_memory):
else:
if model == 'res.partner':
model_obj = self.pool.get('mail.thread')
- res = self.pool.get(model).browse(cr, uid, [res_id])
- model_obj.message_append_dict(cr, uid, res, msg)
+ model_obj.message_append_note(cr, uid, [res_id], body=msg)
notify = "Mail succefully pushed"
url = self._make_url(cr, uid, res_id, model)