Ir al contenido
Menú
Se marcó esta pregunta
4 Respuestas
6716 Vistas

Salespeople assigned to invoices are notified each time one is created.

Can I stop this? 

Avatar
Descartar
Autor

Thanks for your answer, Shivoham. 

The forum thread you send me is quite old and refers to version 8. My DB is in version 13.
It does not exactly relate to my question either.
I need the salespeople not to receive a notification for every invoice created. When an invoice is created (before being posted) they receive a message that says: "You have been assigned to invoice... ".
There are a lot of invoices so they receive too much useless notifications. 

Dit you get a solution for this yet?
I created an automated action that removes followers from the invoice (based on a condition on the contact so we can select who is allowed to follow invoices), but the mail gets send before the automated action removes the followers...
You should be able to control this in the Subtypes in Technical Settings (v15) but this seems to be hard coded behavior.
I am hoping you found a solution, if so please share.

@Toon van der Ploeg, you may need to create the automated action on the followers model so they are never added to an invoice.

https://www.odoo.com/forum/help-1/automated-action-to-remove-vendor-as-default-follower-from-po-v14-181175

@Jaideep, Thanks for the suggestion. I already tried that. Both on the Invoice model and on the Followers model. In both cases the mail still gets send. First mail "you have been assigned to draft invoice..." and the second when the invoice is confirmed simply always cc's that mail to the Salesperson.
I think @Canditroot provided the best approach: overriding the method based on a condition. But I would need the steps to do that in odoo.sh. Condition in my case could be a Boolean on the partner model "cc in customer invoices".

Mejor respuesta

In Developer Mode, create an Automation from Settings --> Technical --> Automation --> Automation Rules

 

Avatar
Descartar
Autor

It seems a good solution, but it's not working for me. (15.0EE, On premise)
I assume that the field "Partners" is partner_ids, who are the recipients of the notification.
I've implemented this as a Python action in order to debug it.
I checked that the action is running and that the fields are set to False at the end of the code.
However, when checking the mail.message record, you can see that the partner_ids field is set to False (ok), but not the other fields.
Notification is sent to users.

#This is my code:
for record in records:
record['partner_ids'] = False
record['notified_partner_ids'] = False
record['notification_ids'] = False

If someone has an idea, it will be appreciated.

You can always use Python code via EXECUTE CODE:

env["mail.mail"].search([your_custom_domain]).cancel()

Thank you Ray, this worked for me (tested in v17).

Mejor respuesta

You may override the method '_message_auto_subscribe_notify' and stop the notification message based on condition

Thanks & Regards,



CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229-1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat 380015
    

Avatar
Descartar
Mejor respuesta

The Odoo customer care response was to remove the "Status Change" message subtype for the model sales.order. 

It seems to have worked..  But OTOH if we did want to have a message when the sales order (subscription) status changed, we probably wouldn't get it..



Update after last batch of invoices.  This did not work.  Back to talking with Customer services.

Avatar
Descartar

Hi Gerard ONeill, can you please clarify how to do this workaround. Where to find this option to remove 'status change' message subtype. Thanks

Hi Jet Bolivar - To check message subtypes go to: Settings -> Technical -> Discuss: Subtypes.

You have to find the combination of subtype and model - each model determines what message can be sent and when.

By unchecking the "Default" flag, it "disable's" it.

Again - Limited knowledge here; I asked technical support, and aside from giving me this answer, they weren't helpful about debugging or gotchas or other ways of helping with this subject.

Mejor respuesta

You might need to deactivate the Qweb View: message_user_assigned

Do check the post below, though it refers to deactivating user assigned notifications on an SO it might help.

https://www.odoo.com/forum/help-1/prevent-the-message-from-automatically-going-out-when-salesperson-is-assigned-to-an-so-and-its-confirmed-190501

Avatar
Descartar

That is certainly helpful, but won't this disable all assignment messages?
What if we simply do not want Salespersons to be assigned to Customer Invoices? Many organizations have an AP department for that.

I could not edit my previous comment. But I tested disabling the view, still email gets sent out "you have been assigned to draft invoice..."

Sorry, I hadn't tested this myself had forwarded the post as is. Also, would you know if you were creating an Invoice from an existing SO (SO that was created prior to deactivating the view)?

Also, if your case is to exclude a person or group you could probably create an automated action

A few posts on how that could be helpful
https://www.odoo.com/forum/help-1/how-can-i-remove-all-followers-via-an-automated-action-189762
https://www.odoo.com/forum/help-1/automated-action-to-remove-a-follower-205944
https://www.odoo.com/forum/help-1/automated-action-to-remove-vendor-as-default-follower-from-po-v14-181175

Autor

Jaidepp: Thanks for your today's answer. I will study it carefully

Publicaciones relacionadas Respuestas Vistas Actividad
2
nov 23
7216
9
dic 22
24020
0
oct 18
3492
6
mar 15
10159
1
mar 15
5566