I need to define many email addresses on recipients (or secondary recipients) field in notification email.
I first thought to define all emails in a single contact mechanisms with comma separator, but it does not work in some email servers for security policies; each email must be an item on the recipients list.
So I’m wondering if it should be considered on the module when extracting email from party/employee/contact mechanism.
Of course I can add more recipients fields if it is not a desired feature/bugfix.
Sorry but I don’t see it. Indeed the code is ready to manage many recipients but at the end the recipients field is a Many2One.
Is quite simple: they need to send the message to more than one party email addresses for sales or invoices.
Using the contact defined on document is not enough as there are cases of more than 2 addresses.
Just comment is not a requirement of a single customer, we have several with this situation. But with the trick of comma separate emails the others could work.
You can create a functional One2Many field with all the involved parties and use it for email notification.
If the contact fields on the document are not enought how you know which addresses are related to the parties?
Could you please explain the problems of your customers (and not only how you think it can be solved)?
If you explain the real use case it’s easier to find a solution that works for all.
Then probably the best option is to extend _get_addresss method of the notifications to return all the email addresses and names where you want to send the notification.
I’m afraid I haven’t explained myself correctly because it is happening with many customers in many deployments.
Indeed we are moving all from electronic_mail to notification_email and we find a few requirements not supported.
Anyway thanks for your comments, finally I extended _get_address to manage email contact mechanism with many addresses separated with comma.
I still find this requirement very strange. Such companies are really not structured at all to have such requirements from their suppliers. And what a waste of attention to send the same automatic email to many person in a company.
I think it is a bad idea because it pervert the design and it will probably break any other module that is using contact mechanism.
I think it is better to add support for relation field pointing to contact mechanism. But it would ignore it if it is not an email and/or its usage is not compatible.
IMHO it is not a requirement but a complementary feature as contact mechanisms is already managed through party.
But will be great to have such 2 features.