Merge lp:~openerp-dev/openobject-addons/7.0-fix-mail_issues-adh into lp:openobject-addons/7.0

Proposed by Anand Dharampuriya(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-fix-mail_issues-adh
Merge into: lp:openobject-addons/7.0
Diff against target: 56 lines (+10/-2)
3 files modified
mail/mail_group.py (+4/-1)
mail/mail_thread.py (+1/-1)
mail/static/src/css/mail.css (+5/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-fix-mail_issues-adh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+222933@code.launchpad.net

Description of the change

Hello,

I had fixed some mail issues which are currently present in 7.0/addons.

Regards,
ADH

To post a comment you must log in.

Unmerged revisions

10064. By Anand Dharampuriya(OpenERP)

[FIX] Solve some mail issues which are currently present in 7.0/addons

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mail/mail_group.py'
2--- mail/mail_group.py 2013-08-27 15:07:08 +0000
3+++ mail/mail_group.py 2014-06-12 12:07:36 +0000
4@@ -24,6 +24,7 @@
5 from openerp.osv import osv
6 from openerp.osv import fields
7 from openerp import SUPERUSER_ID
8+from openerp.tools.translate import _
9
10
11 class mail_group(osv.Model):
12@@ -46,7 +47,7 @@
13
14 _columns = {
15 'name': fields.char('Name', size=64, required=True, translate=True),
16- 'description': fields.text('Description'),
17+ 'description': fields.text('Description', translate=True),
18 'menu_id': fields.many2one('ir.ui.menu', string='Related Menu', required=True, ondelete="cascade"),
19 'public': fields.selection([('public', 'Public'), ('private', 'Private'), ('groups', 'Selected Group Only')], 'Privacy', required=True,
20 help='This group is visible by non members. \
21@@ -172,6 +173,8 @@
22 mail_alias = self.pool.get('mail.alias')
23 alias_ids = [group.alias_id.id for group in groups if group.alias_id]
24 # Delete mail_group
25+ if self.pool['ir.model.data'].get_object_reference(cr, uid, 'mail', 'group_all_employees')[1] in ids:
26+ raise osv.except_osv(_('Warning!'), _('You cannot delete this group because some other modules are dependent on it'))
27 res = super(mail_group, self).unlink(cr, uid, ids, context=context)
28 # Delete alias
29 mail_alias.unlink(cr, SUPERUSER_ID, alias_ids, context=context)
30
31=== modified file 'mail/mail_thread.py'
32--- mail/mail_thread.py 2014-05-05 09:43:29 +0000
33+++ mail/mail_thread.py 2014-06-12 12:07:36 +0000
34@@ -944,7 +944,7 @@
35 return result
36 if partner and partner in obj.message_follower_ids: # recipient already in the followers -> skip
37 return result
38- if partner and partner in [val[0] for val in result[obj.id]]: # already existing partner ID -> skip
39+ if partner and partner.id in [val[0] for val in result[obj.id]]: # already existing partner ID -> skip
40 return result
41 if partner and partner.email: # complete profile: id, name <email>
42 result[obj.id].append((partner.id, '%s<%s>' % (partner.name, partner.email), reason))
43
44=== modified file 'mail/static/src/css/mail.css'
45--- mail/static/src/css/mail.css 2014-02-14 13:17:05 +0000
46+++ mail/static/src/css/mail.css 2014-06-12 12:07:36 +0000
47@@ -672,3 +672,8 @@
48 .openerp .oe_mail .oe_view_nocontent > p {
49 padding-left: 15px;
50 }
51+@media print {
52+ .openerp .oe_form div.oe_chatter {
53+ display: none !important;
54+ }
55+}
56\ No newline at end of file