Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
4 Ответы
15553 Представления

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?

Related Posts Ответы Просмотры Активность
1
апр. 16
7917
3
окт. 18
25694
3
нояб. 16
2982
0
мар. 16
40
0
янв. 16
3932