f8c7f2e5bb2495a0a7d68a15033a94a90f51dd9b
Main attachment is quite costly and as it is implemented in mail.thread, is present in most model. In order to improve performance, we remove it here from mail.thread and add it, through a new mixin, only on models that actually use that feature. Technical note: with the current implementation, even if the font-end view expect the model to implement the main attachment feature and the model doesn't, it doesn't crash. Indeed, the main attachment on the front-end is only used to know the first image to display in the image 'carousel' on the right (widget rendered through the presence of the class o_attachment_preview). And as 'register_as_main_attachment' of ir.attachment doesn't crash even if the model doesn't support main attachment feature, the only consequence is that the first image to display is not persisted (if you refresh after changing the main attachment, it will get back to the previous one). Task-2648976 Part-of: odoo/odoo#110734
…
…
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%