Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
15752 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Tác giả

I fixed it :)

Câu trả lời hay nhất

Hi 

How did you fixed it??

Ảnh đại diện
Huỷ bỏ

did you find the solution?

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 16
8105
3
thg 10 18
25848
3
thg 11 16
3126
0
thg 3 16
40
0
thg 1 16
4047