Yannick Vaucher @ Camptocamp has proposed merging lp:~camptocamp/ocb-addons/7.0-fix-1311087-rgo into lp:ocb-addons.
Requested reviews: OpenERP Community Backports (ocb) Related bugs: Bug #1311087 in OpenERP Community Backports (Addons): "mail: 'Send a message' generates excessively slow queries" https://bugs.launchpad.net/ocb-addons/+bug/1311087 For more details, see: https://code.launchpad.net/~camptocamp/ocb-addons/7.0-fix-1311087-rgo/+merge/224247 Fix delay issue when sending message. This is the replication to ocb from official opw patch: http://bazaar.launchpad.net/~openerp-dev/openobject-addons/7.0-opw-606994-rgo/revision/10065 This was also applied on master https://github.com/odoo/odoo/blob/master/addons/mail/mail_message.py#L856-864 And also on 7.0 https://github.com/odoo/odoo/blob/7.0/addons/mail/mail_message.py#L881-888 -- https://code.launchpad.net/~camptocamp/ocb-addons/7.0-fix-1311087-rgo/+merge/224247 Your team OpenERP Community Backports is requested to review the proposed merge of lp:~camptocamp/ocb-addons/7.0-fix-1311087-rgo into lp:ocb-addons.
=== modified file 'mail/mail_message.py' --- mail/mail_message.py 2014-03-10 08:54:20 +0000 +++ mail/mail_message.py 2014-06-24 08:43:01 +0000 @@ -881,9 +881,11 @@ fol_ids = fol_obj.search(cr, SUPERUSER_ID, [ ('res_model', '=', message.model), ('res_id', '=', message.res_id), - ('subtype_ids', 'in', message.subtype_id.id) ], context=context) - partners_to_notify |= set(fo.partner_id for fo in fol_obj.browse(cr, SUPERUSER_ID, fol_ids, context=context)) + partners_to_notify |= set( + fo.partner_id for fo in fol_obj.browse(cr, SUPERUSER_ID, fol_ids, context=context) + if message.subtype_id.id in [st.id for st in fo.subtype_ids] + ) # remove me from notified partners, unless the message is written on my own wall if message.author_id and message.model == "res.partner" and message.res_id == message.author_id.id: partners_to_notify |= set([message.author_id])
-- Mailing list: https://launchpad.net/~openerp-community-reviewer Post to : openerp-community-reviewer@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-community-reviewer More help : https://help.launchpad.net/ListHelp