I must be doing something completely wrong:
odoo.define('my_module.popups', function (require) {
'use strict';
var ajax = require('web.ajax');
var core = require('web.core');
var _t = core._t;
var qweb = core.qweb;
ajax.loadXML('/my_module/static/xml/templates.xml', qweb);
var data = {modal_title: 'This is a popup!',modal_body: 'testtest'};
var p = qweb.render("my_module.popup1_template", data);
p.prependTo('body');
});
I'm not sure I understand this. The code inside define is never executed. I read many docs and examples, on how to create a Widget etc. But the documentation never explains how do you use/call this stuff that you put inside the 'define'.
I could also just manually create a popup and prepend it to the body element, but I want to do this the odoo way.