Files
odoo_source/addons/mail
std-odoo e75ea7db53 [FIX] mail: for the complexity of the mail message unlink method
Bug
===
When we remove some mail messages, we invalidate the cache of the
related documents. But in the same loop we call _invalidate_documents
which invalidate the cache, and so at the next iteration we will need
to make a new SQL query to know if the message is a "thread message".

So because of the prefetch ids, and because we invalidate in the loop,
if we unlink 1000 message, we will make 1000 SQL queries to fetch the
fields values of the 1000 messages.

Note that the unlink method will invalidate the entire cache anyway,
so unlike the write / create methods, we shouldn't need to invalidate
manually the related documents.

Task-3171093

closes odoo/odoo#112494

X-original-commit: f8958e9bbd4c7c37f614b20f7ed4d4825d438362
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-02-13 14:05:18 +01:00
..
…

Odoo Enterprise Social Network

Connect with experts, follow what interests you, share documents and promote best practices with Odoo Enterprise Social Network. Get work done with effective collaboration across departments, geographies, documents and business applications. All of this while decreasing email overload.

Connect with experts

Next time you have a question for the marketing, sales, R&D or any other department, don't send an email blast-post the question to Odoo and get answers from the right persons.

Follow what interests you

Want to get informed about new product features, hot deals, bottlenecks in projects or any other event? Just follow what interests you to get the information you need what you need; no more, no less.

Get Things Done

You can process (not only read) the inbox and easily mark messages for future actions. Start feeling the pleasure of having an empty inbox every day; no more overload of information.

Promote best practices

Cut back on meetings and email chains by working together in groups of interests. Create a group to let people share files, discuss ideas, and vote to promote best practices.

Improve Access to Information and Expertise

Break down information silos. Search across your existing systems to find the answers and expertise you need to complete projects quickly.

Collaborate securely

Set the right security policy; public, private or on invitation only -- according to the information sensitivity.

A Twitter-like Network For My Company

Make every employee feel more connected and engaged with twitter-like features for your own company. Follow people, share best practices, 'like' top ideas, etc.