Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

26

How to stop OpenERP from adding partner as followers automatically

By
Michael Karrer
on 7/23/13, 11:06 AM 27,426 views

Is there a Way to stop OpenERP from automatically adding followers to documents like projects and opportunities if they are just partners (Clients or Suppliers) but no internal OpenERP users?

The problem is that a lot of time we do write an initial E-mail to our client - this almost every time adds him automatically as a follower. Then you have to remove him again to make sure that no unwanted E-mails are send to the Partner.

If i could add a rule that partners are never automatically added as followers but only system users i would clearly avoid a lot "unwanted" E-Mails. But still be able to internally inform all important ERP users.

Any suggestion is welcome!

Tried to find a "rule" for it but did find nothing?!?

Michael Karrer
on 7/24/13, 11:23 AM

Any ideas on how to achieve this? Do you receive an answer Michael?

AppliSential (Pty) Ltd
on 7/29/13, 6:40 PM

No still no answer and nothing else found on the internet - Please vote for this question so it may get the attention of openerp

Michael Karrer
on 8/1/13, 11:58 AM

This is huge! Please fix.

Christian
on 8/15/13, 6:16 AM

We just startet with OpenERP and today the same problem popped up today I worked on a task regarding a fair in January which we wanted to attend. I wrote an eMail to Florian as I know that he knows the right people to talk to. Later I wrote another message to Ali and asked him a questions on the fair. Unfortunately this message has also been sent to Florian as he has automatically been added as a follower.

Feuerwear GmbH & Co. KG, Robert Klüsener
on 9/2/13, 7:40 AM
5
Michael Karrer
On 7/10/14, 4:11 PM

I will Upload our module soon to Github if anyone is still in need of this functionality. We also created a Global BCC Mdoule to BCC the E-Mails generated by OpenERP to our own E-Mail Server for Archiving Searching and Backup. - Still i do feel that the E-Mail integration in OpenERP is just not really well done / ready enough for real life scenarios.

Please find our Modules at:

https://github.com/OpenAT/odoo-addons/tree/7.0

Look for chatterimprovements and mayby globalbcc could be handy also.
 

Still i would like to ask you if there are other interested in taking the chatter module some steps further like:

  • CK Editor
  • Zimbra or other Mail integration (like having mails in both worlds)
  • Move Mails or "full conversations" between Objects in case of wrong assignment in the first place
  • Full Text E-Mail search
  • Add Attachments from existing Documents and possible from OWN Cloud
  • Drag and Drop Attachments to Messages
  • Make it possilbe to select and deselect recipients when sending mails no matter if they are followers or not!

Is anyone interrested in joining Forces on one or more of these topics?

I would really like this Michael. Under which name it is going to be uploaded?

Mibo, Michael Bos
on 8/23/14, 4:25 AM

Where can I find your Github repo? It should be nice to probe your modules

Javi Meléndez
on 8/28/14, 4:40 AM

Hello Michael, We're about to start developing such funcionality. Are you going to share the module you mention?

Carlos Liébana Anero
on 9/1/14, 2:22 PM

Hello Michael, is there a version of your module that works with Odoo 8?

Peter A
on 8/18/15, 5:44 PM
6
julien rey
On 4/6/14, 8:41 AM

This behavious is actually generating many issues. On my side, i have changed the file mail_thread.py from this :

    # automatically subscribe recipients if asked to
    if context.get('mail_post_autofollow') and thread_id and partner_ids:
        partner_to_subscribe = partner_ids
        if context.get('mail_post_autofollow_partner_ids'):
            partner_to_subscribe = filter(lambda item: item in context.get('mail_post_autofollow_partner_ids'), partner_ids)
        self.message_subscribe(cr, uid, [thread_id], list(partner_to_subscribe), context=context)

to this :

        # automatically subscribe recipients if asked to
    #if context.get('mail_post_autofollow') and thread_id and partner_ids:
    #    partner_to_subscribe = partner_ids
    #    if context.get('mail_post_autofollow_partner_ids'):
    #        partner_to_subscribe = filter(lambda item: item in context.get('mail_post_autofollow_partner_ids'), partner_ids)
    #    self.message_subscribe(cr, uid, [thread_id], list(partner_to_subscribe), context=context)

Now adding automatically follower is disabled.

++

Julien

I tried your solution and it works for the first test. How do you make the solution permanent against a "git pull" ? Is "git rm mail_thread.py" enough?

Tobias Frankl
on 2/25/15, 1:27 AM

Could somebody please Show, how this working solution could also be applied to the mail_group.py=discussion groups?

Tobias Frankl
on 4/11/15, 4:55 AM

Is this code for 7.0 or 8.0? I'm looking for a solution for Odoo 8.

Peter A
on 8/18/15, 5:47 PM
2
Victor Major
On 5/6/15, 9:31 PM

Is there a way to achieve this within Odoo 8 without hacking into the code and thus making the change stable and persistent? I cannot think of a situation where I would want the Customer or "Patner" to be privy to our internal communications by default. Whoever thought that this was a good idea is mistaken.

Victor, did you find a solution?

Peter A
on 8/18/15, 5:46 PM
0
Daniel Blanco
On 9/24/16, 10:45 AM

Ray buy "check out" do you mean mute these functions? or study them?

Something like this would work?

from openerp.osv import osv, fields

class mail_followers(osv.Model):
_inherit = 'mail.followers'
def get_partners_to_email(self, cr, uid, ids, message, context=None):
pass


class mail_thread(osv.AbstractModel):
_inherit = 'mail.thread'
def message_get_suggested_recipients(self, cr, uid, ids, context=None):
pass


class crm_lead(format_address, osv.osv):
_inherit = 'crm.lead'
def message_get_suggested_recipients(self, cr, uid, ids, context=None):
pass


class project_issue(osv.Model):
_inherit = "project.issue"
def message_get_suggested_recipients(self, cr, uid, ids, context=None):
pass

The intention was to put this as a comment, not an answer. Sorry.

Daniel Blanco
on 9/24/16, 10:50 AM
0
Greg Rusden
On 5/31/16, 8:00 AM

For 8.0 Community Users the easiest way to achieve this behavior is by using the edit suggested by Julien Rey above:

Locate Mail_thread.py @ C:\Program Files (x86)\Odoo 8.0\server\openerp\addons\mail.

Locate this code (Line 1677):

 # automatically subscribe recipients if asked to
    if context.get('mail_post_autofollow') and thread_id and partner_ids:
        partner_to_subscribe = partner_ids
        if context.get('mail_post_autofollow_partner_ids'):
            partner_to_subscribe = filter(lambda item: item in context.get('mail_post_autofollow_partner_ids'), partner_ids)
        self.message_subscribe(cr, uid, [thread_id], list(partner_to_subscribe), context=context)

Then comment out the 5 lines beneath so it looks like this:

       # automatically subscribe recipients if asked to
    #if context.get('mail_post_autofollow') and thread_id and partner_ids:
    #    partner_to_subscribe = partner_ids
    #    if context.get('mail_post_autofollow_partner_ids'):
    #        partner_to_subscribe = filter(lambda item: item in context.get('mail_post_autofollow_partner_ids'), partner_ids)
    #    self.message_subscribe(cr, uid, [thread_id], list(partner_to_subscribe), context=context)

In addition to this change, the module made by Smile, ( https://apps.openerp.com/apps/modules/8.0/smile_followers/ ), prevents the creators of events like quotes being added to the 'Followers' List.

0
IT Libertas
On 3/13/16, 6:01 PM

Have a look at this module: https://apps.odoo.com/apps/modules/9.0/compoze_no_auto_subscribe/. It may be really comfortable to use to that purposes

0
Turkesh Patel
On 6/29/15, 8:32 AM

For Sale order i get to know that in action_button_confirm method code is there to manually add customer as a follower in portal_sale module (portal_sale.py using message_subscribe method). if you do not want to add customer as a follower you can comment this code or override that method in your module to avoid this functionality.

0
Dr Obx
On 6/11/15, 10:41 AM

It's a long time since you guys started this topic.

Is any module removing followers available or the only way is dig in the code ?

0
Carlos Liébana Anero
On 10/3/14, 12:03 PM

Michael, thanks for your module. We're going to test it and we'll give feedback soon.

0

Ray Carnes

--Ray Carnes--
15717
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 10/31/13, 11:23 PM

Check out these functions:

get_partners_to_notify - in /addons/mail/mail_followers.py

message_get_suggested_recipients - in /addons/mail/mail_thread.py

message_get_suggested_recipients - in /addons/crm/crm_lead.py

message_get_suggested_recipients - in /addons/project_issue/project_issue.py

Hello Ray. Can you explain to a beginner how must these files be changed? Thanks beforehand

my
on 11/2/13, 7:40 AM

Finally we did develop a module together with a partner from us that allows us to set on every res.partner if it should get added automatically - spend some money for that also this module is able to show much more information in the chatter log e.g.: to what persons an E-Mail was really sent and so on...

Michael Karrer
on 2/13/14, 11:25 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

13 follower(s)

Stats

Asked: 7/23/13, 11:06 AM
Seen: 27426 times
Last updated: 11/10/16, 7:38 AM