Christophe Matthieu (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-fix-access-mail-chm into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-fix-access-mail-chm/+merge/138205

[FIX] mail:
bug: when a user try to delete a document, no access error.
debug: delete followers after the document.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-fix-access-mail-chm/+merge/138205
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-fix-access-mail-chm.
=== modified file 'mail/mail_thread.py'
--- mail/mail_thread.py	2012-11-29 22:26:45 +0000
+++ mail/mail_thread.py	2012-12-05 15:15:42 +0000
@@ -237,10 +237,12 @@
         # delete messages and notifications
         msg_ids = msg_obj.search(cr, uid, [('model', '=', self._name), ('res_id', 'in', ids)], context=context)
         msg_obj.unlink(cr, uid, msg_ids, context=context)
+        # delete
+        res = super(mail_thread, self).unlink(cr, uid, ids, context=context)
         # delete followers
         fol_ids = fol_obj.search(cr, uid, [('res_model', '=', self._name), ('res_id', 'in', ids)], context=context)
-        fol_obj.unlink(cr, uid, fol_ids, context=context)
-        return super(mail_thread, self).unlink(cr, uid, ids, context=context)
+        fol_obj.unlink(cr, SUPERUSER_ID, fol_ids, context=context)
+        return res
 
     def copy(self, cr, uid, id, default=None, context=None):
         default = default or {}

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to