我做了一些改变,现在可以了
'qweb': ['static/src/xml/acp.xml'],
js公司_第js页
重命名函数
odoo.define('web_java_11.app',...
require('web.dom_ready');
var App = Widget.extend({
template: "showData",
init: function(parent) {
console.log('init');
this._super.apply(this, arguments);
},
start: function(){
console.log('entra');
},
});
类acp\u应用程序中的外观模板
var $elem = $('.acp_application');
var app = new App();
app.appendTo($elem).then(function () {
bus.start_polling();
});
template.xml
<template id="index_2" name="acp_index_2">
<html>
<head>
<t t-call-assets="web.assets_common" />
<t t-call-assets="web.assets_backend" />
<t t-call-assets="web.assets_frontend" />
</head>
<body>
<div class="container">
<div class="acp_application"></div>
</div>
</body>
</html>
</template>
<templates id="template" xml:space="preserve">
<t t-name="showData">
<div>template</div>
<button>send</button>
</t>
</templates>