Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
468 Visninger

Since Odoo 16 or 17 when you upload an image to the internal notes field a document (attachment) is created (see example 2). If i delete the document, the image will get deleted as well (see example 3).

Here is the example 1. No image, nothing on internal notes, no attachments and no documents:

Here is the example 2. 1 image on internal notes, 1 attachment and 1 document (the image is a red cross):

Here is the example 3. No image on internal notes (but a placeholder instead), no attachments and no documents:


Is there a way to avoid this flow and work as in previous versions where an uploaded image inside a text field would not generate an attachment (and a document)?

Avatar
Kassér
Bedste svar

Hi,

Since Odoo 16/17, images added in HTML fields (like Internal Notes) are no longer stored inline as base64 but are saved as attachments/documents. This was a deliberate change to improve performance, avoid database bloat, and centralize file management.

There’s no setting to switch back to the old behavior. If you want images stored inline again, it requires customization of the HTML widget or upload process. However, reverting has trade-offs, such as larger database size and slower performance when many images are used.


Hope it helps

Avatar
Kassér
Forfatter

Yes it does, thank you.

Bedste svar

Uploading an image in an html field (like Internal Notes) always creates an ir.attachment.


If you want to prevent it, it requires code customization by overriding ir.attachment.create() and product.document.create() and restricting attachments for that field/model.


For customization,

contact: info@srikeshinfotech.com

Whatsapp: +91 75388 24350

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
0
dec. 24
1892
1
mar. 23
7171
2
apr. 22
4677
0
okt. 21
2989
2
maj 20
12626