تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4 الردود
15913 أدوات العرض

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
أبريل 16
8244
3
أكتوبر 18
25961
3
نوفمبر 16
3242
0
مارس 16
40
0
يناير 16
4161