[IMP]attachment_preview: Fix issue with attachment JS not loading properly.

This commit is contained in:
Bhavesh Heliconia 2025-03-13 10:46:06 +05:30
parent 3ca5b22649
commit b13d72e5e8

View File

@ -1,9 +1,9 @@
/** @odoo-module **/
/* eslint-disable no-undef */
import AttachmentPreviewWidget from "../../attachmentPreviewWidget.esm";
import FormRenderer from "web.FormRenderer";
import {registerInstancePatchModel} from "@mail/model/model_core";
odoo.define("attachment_preview.attachment_card", function (require) {
var rpc = require("web.rpc");
var chatterpreviewableAttachments = [];
@ -77,12 +77,7 @@ odoo.define("attachment_preview.attachment_card", function (require) {
);
}
function getUrl(
attachment_id,
attachment_url,
attachment_extension,
attachment_title
) {
function getUrl(attachment_id, attachment_url, attachment_extension, attachment_title) {
var url = "";
if (attachment_url) {
if (attachment_url.slice(0, 21) === "/web/static/lib/pdfjs") {
@ -262,4 +257,3 @@ odoo.define("attachment_preview.attachment_card", function (require) {
},
}
);
});