034d369c100511e8c9ee2dd469a453d6240dc45d
_insert_followers in create of mail.thread
The `_insert_followers` wasn't batch in the `create` of `mail.thread` for no reason, which call the create of a `mail.follower` one by one. It is inefficient for the batch records creation (import or some flows) of a model with `_inherit = [mail.thread, ...]`. Then batch it, to miminize the cost of `_insert_followers`: The creation of 100 `mail.follower` takes: - 0.107 sec if you create one by one (before) - 0.022 sec if you create in batch (now) Also add two tests (on model with a chatter): - One testing the behavior of follower and subtype in case of multi-create - One testing the number of queries done to create 5 records. The old SQL request count was 23, now it is 19 (-1 by create call). task-2711448 closes odoo/odoo#80954 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%