Hello,
I want to create a custom front-end page, and I want to reuse the website.layout template, which provides header and footer of the website page.
Inside the body section, I want to have a button. When that button is clicked, I want to call some javascript and make some communication with the back-end server.
What I have done is to follow the Theme tutorial (https://www.odoo.com/documentation/9.0/howtos/themes.html), but that tutorial is kind of creating a static page, I mean it lacks of how to communicate with backend and how to include javascript correctly.
I also try this code:
<button id="create_new_db" class="mt16">Create</button>
And js: I place these lines globally in a js file, I don't know where else to place it.
var button = document.getElementById("create_new_db");
console.log("Button: ", button);
This console.log shows "null"
I think that i took a wrong step, so my js get called before the page is rendered.
I have tried to find document on Odoo document for developer but still lost. The "Building interface extension" is still for v8.
Could you please give me some hint ?
Thank you!