Odooers论坛

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

Avoid message "You have been assigned to" for new invoices

5 注释
形象
丢弃
形象
odoo
-
形象
odoo
-

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. 

形象
odoo
-

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.

形象
odoo
-

@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

形象
odoo
-

@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".

4 答案
0
形象
odoo
最佳答案

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

 

3 注释
形象
丢弃
形象
odoo
-

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.

形象
odoo
-

You can always use Python code via EXECUTE CODE:

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

形象
odoo
-

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

0
形象
odoo
最佳答案

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
    

形象
丢弃
0
形象
odoo
最佳答案

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.

2 注释
形象
丢弃
形象
odoo
-

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

形象
odoo
-

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.

0
形象
odoo
最佳答案

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

4 注释
形象
丢弃
形象
odoo
-

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.

形象
odoo
-

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..."

形象
odoo
-

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

形象
odoo
-

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