Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
4 Antwoorden
15702 Weergaven

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.

Avatar
Annuleer
Beste antwoord

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.

Avatar
Annuleer
Auteur

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

Auteur

I fixed it :)

Beste antwoord

Hi 

How did you fixed it??

Avatar
Annuleer

did you find the solution?

Gerelateerde posts Antwoorden Weergaven Activiteit
1
apr. 16
8064
3
okt. 18
25812
3
nov. 16
3082
0
mrt. 16
40
0
jan. 16
4021