Merge PR #485 into 14.0

Signed-off-by hbrunn
This commit is contained in:
OCA-git-bot 2024-07-08 08:17:41 +00:00
commit 13704e9f6c
2 changed files with 4 additions and 1 deletions

View File

@ -1,2 +1,3 @@
* Holger Brunn <mail@hunki-enterprises.com>
* Dennis Sluijk <d.sluijk@onestein.nl>
* Sebastiano Picchi <sebastiano.picchi@pytech.it>

View File

@ -334,7 +334,9 @@ odoo.define("/attachment_preview/static/src/js/attachment_preview.js", function
attachments = _.object(
attachments.map((att) => {
return parseInt(att.localId.slice(16), 10);
const tmp_id = parseInt(att.localId.slice(16), 10);
if (tmp_id > 0) return tmp_id;
return null;
}),
attachments.map((at) => {
if (at.defaultSource) {