Skip to Content
Menu
This question has been flagged
11 Replies
11040 Views

Almost three years ago, on 25/03/2013, Scarlet Vacaru answered this way  to my question: 

"I also had the same problem with email notifications to customers. Situation: I created a Quotation, then I Confirmed the sale. When confirming the sale, the customer was being sent an email to follow the document. And that was bad for us. I deactivated the Customer Portal and now it's alright, customers are not notified any longer. For anyone new to Openerp 7.0, the path is: Settings/Configuration/General Settings - Portal Acces - then check or uncheck the "Activate the customer portal" button. You might give a second look to see whether the customer portal is activated or not. In my situation, I thought it might be something related to social networking or to followers, but it was a false trace. Anyway, activating the customer portal has its logic: they are for sure notified when the portal is active".

link https://www.odoo.com/es_ES/forum/ayuda-1/question/how-to-avoid-sending-notifications-per-email-2489

But it doesn't work for me in odoo 8. 

When I schedule a meeting (ever if the partner has Customers > Sales & Purchases > Receive Messages by Email = never) the partner receives a mail. 


Is it any other no coding solution?

(deactivate portal is no the solution, neither)


Andrea

Avatar
Discard
Best Answer

For calendar events you may add the system parameter (Settings > Technical > Parameters > System Parameters) - ''calendar.block_email". It would block all email notifications (not only portal users). There is no non-code way to block notifications only for customers.

UPDATE

Do not forget to add at least one group to the config. Since invitation is sent from a real user (not super user), this user should have an access to this parameter. Finally, you should have the record: "calendar.block_mail; True; Human Resources/Employee". To the latter you may also add "Portal" in case your portal users may add events

Avatar
Discard
Best Answer

Hi, the parameter should be "calendar.block_mail" rather than "...email". 

Avatar
Discard
Best Answer

I added the “calendar.block_email, True, 0 records” parameter but still its sending the inviters. I’m on Odoo 11

Avatar
Discard
Best Answer

Hello

Try below code to avoid email notification when try to create new record (version 10.0)

For example if you want to create new task but disable email notification to follower you can reference below code

task = super(Task, self.with_context(mail_notrack=True)).create(vals)

Hope this help you.

Best Thanks,

Ankit H Gandhi.


Avatar
Discard
Best Answer

In v11, the field group_ids doesn't exist anymore, no need to specify any group.

It works fine.


Avatar
Discard
Author Best Answer

Thanks a lot for your answer. 

I have found the funtion _send_mail_to_attendees, it seems the responsible for the email to anteendes (as the name states). 

[code] def _send_mail_to_attendees(self, cr, uid, ids, ..., context=None):

        """

        Send mail for event invitation to event attendees.

        """

        res = False


        if self.pool['ir.config_parameter'].get_param(cr, uid, 'calendar.block_mail', default=False) or context.get("no_mail_to_attendees"):

            return res

[/code]

There are two way to block email: using calendar.block_mail or no_mail_to_attendee.

Your way seems to work over the first parameter.

As suggersted, I addede the system parameter (Settings > Technical > Parameters > System Parameters) - ''calendar.block_email".

I needed three values: key, value, group.

They are now: calendar.block_email, True, 0 records.


But, the emails are still send. 

Did I miss something?


Andrea


Avatar
Discard

Please find the section "Update" in a previous answer

Author

Neither now. It should be something different in my case.

How can I check if the system variable () in set to True?

Strange: I checked it in my database.

Try to add some logger of print into the function: what does self.pool['ir.config_parameter'].get_param(cr, uid, 'calendar.block_mail', default=False) return? Instead of 'uid' use your user id

Or just to your code in the function _send_mail_to_attendees, in the very first line "return False"

Author

It works!!

I used the wrong group configuration (with inappropriate names and values).

Thanks a lot.

Glad to hear! Please accept the answer above

Related Posts Replies Views Activity
6
Nov 24
5982
0
Nov 23
386
0
Oct 23
778
1
Jul 23
3344
7
Mar 20
8117