コンテンツへスキップ
メニュー
この質問にフラグが付けられました
4 返信
15915 ビュー

I created my own index file in odoo website. And added a js like below:

odoo.define('website_olio.extend_js', function (require) {

"use strict";
var ajax = require('web.ajax');
$(document).ready(function () { 
        $("#idCreate").click(function () {

         -------------------------------------------

})})
});




But Error showing "odoo is not defined" in console.

アバター
破棄
最善の回答

Did you create a whole new HTML page? There is a lot of javascript files that you should link on your html page if you want to be able to use odoo.define.

You should check the templates web.assets_common, web.assets_backend and website.assets_frontend.

アバター
破棄
著作者

Yes. I created a scratch xml file (name;index.xml). Already my designer added some JS file in that index file. Now what file I have to link like that? Could you please

著作者

I fixed it :)

最善の回答

Hi 

How did you fixed it??

アバター
破棄

did you find the solution?

関連投稿 返信 ビュー 活動
1
4月 16
8246
3
10月 18
25963
3
11月 16
3244
0
3月 16
40
0
1月 16
4163