79e9665a495ce92fa177d72e636947194703eccf
Only duplicate emails used to be checked when sending a mass mail. However it is possible (e.g. using templates) to send a mass mail to the same person containing different information. The existing functions to allow models to specify emails processed in the past by some other means are kept. A new check is added in the processing that checks the full contents of the message, subject and attachment ids. The strings are not hashed as most situations are: - Sending the exact same mail to everyone -> Only need to check against one message -> Same complexity as hashing - Sending all different emails -> Checking inequality of str is usually very fast For attachments, as we cannot compare them easily. They are ignored for the purpose of equating emails whenever there are the same number of attachments in the email values as there are on the composer. This is because each email should receive its own copy of the composer attachments. If they have a different number of attachments, they were generated dynamically through reports and we assume they are all different. We can thus remove the 'document based' information as it is implicitly infered from this check. ------------------------- Test utils are also updated for two purposes: 1. Add optional body and attachment_name discriminents assertMailMail assumed all emails could at least be differentiated by subject. Our test breaks that assumption, so we use body and attachment to find the best-fitting email based on the data passed in. 2. Check email_formatted on recipients When using assertMailMailWEmails, we first find the email using the non-formatted email of the recipient. This does not match assertSentMail which checks against the raw email_to value, which would often be formatted. Task-2826811 closes odoo/odoo#99541 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%