From cb944d66ea941a3f80025f56d576677fa9d1c59c Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 17 Aug 2012 09:02:18 +0200 Subject: [PATCH] [IMP] mail message bzr revid: fp@tinyerp.com-20120817070218-rp1ssuhwnf8raitf --- addons/event/event.py | 6 +- addons/mail/mail_followers_view.xml | 4 +- addons/mail/mail_group.py | 4 +- addons/mail/mail_message_view.xml | 62 ++++++------------- addons/mail/mail_thread.py | 4 +- addons/mail/res_partner.py | 3 + addons/mail/res_users.py | 38 ------------ addons/mail/wizard/mail_compose_message.py | 1 + .../mail/wizard/mail_compose_message_view.xml | 12 ++-- addons/plugin/plugin_handler.py | 3 +- 10 files changed, 36 insertions(+), 101 deletions(-) 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