I want to show dialog when click tree-record, i used js to write code below, but odoo show error message like question title
notificationDialogPopup: function(data){
if(data){
const container = document.createElement('div');
container.setAttribute("id","container");
const title = document.createElement('h1');
title.setAttribute("id", "title");
title.innerText = "Title Testing";
const content = document.createElement('p');
content.setAttribute("id","content");
content.innerText = "Content Testing";
const date = document.createElement('h6');
date.setAttribute("id","date");
date.innerText = "11-11-1999";
const author = document.createElement('h6');
author.setAttribute("id","author");
author.inertText = "Admin";
const btnClose = document.createElement('button');
btnClose.setAttribute("id","button");
const style = document.createElement('style');
style.innerHTML = "#notification-container {}"
+ "#title {color:red}"
+ "#content {color:blue}"
+ "#date {color:red}"
+ "#author {color:red}"
+ "#button {color:red}"
document.container.appendChild(title);
document.container.appendChild(content);
document.container.appendChild(date);
document.container.appendChild(author);
document.container.appendChild(btnClose);
document.head.appendChild(style);
document.body.appendChild(container);
}
}
});
i tried change position appendChild but not working