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

Proposed by Anand Dharampuriya(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-fix-adh-mail_issues
Merge into: lp:openobject-addons/7.0
Diff against target: 56 lines (+10/-3)
3 files modified
mail/mail_group.py (+4/-2)
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-adh-mail_issues
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+223524@code.launchpad.net

Description of the change

Hello,
Here I had solved some mail issues which are currently present in addons.

Regards,
 Anand Dharampuriya (ADH)

To post a comment you must log in.

Unmerged revisions

10065. By Anand Dharampuriya(OpenERP)

[IMP] Change warning message while try to delete Whole Company group

10064. By Anand Dharampuriya(OpenERP)

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