Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
4 Antworten
15761 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Autor

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

Autor

I fixed it :)

Beste Antwort

Hi 

How did you fixed it??

Avatar
Verwerfen

did you find the solution?

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Apr. 16
8108
3
Okt. 18
25855
3
Nov. 16
3129
0
März 16
40
0
Jan. 16
4047