Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

implementing basic working owl.carousel.js in odoo results in "Uncaught TypeError: elem[type] is not a function"

By
rosnk
on 4/26/16, 8:33 AM 654 views

I am trying to copy basic working  "owl carousel" into odoo inside my "theme" and i am getting following error while pressing "next" and "previous" button in the "owl carousel": 

" Uncaught TypeError: elem[type] is not a function"


My extended file (assets.xml) from "website.assets_frontend" looks as below: 

<?xml version="1.0" encoding="utf-8" ?>

<openerp>

<data>

<template id="mystyle" name="My style" inherit_id="website.assets_frontend">

<xpath expr="link[last()]" position="after">

 <link rel="stylesheet" type="text/css" href="/my_theme/static/less/owl.carousel.css"/>

<script type="text/javascript" src="/my_theme/static/js/owl.carousel.min.js" />

 <link href="/my_theme/static/less/custom.css" rel="stylesheet" type="text/less" />

<script src="/my_theme/static/js/custom.js"></script>

</xpath>

</template>

</data>

</openerp>


And my "__openerp__.py" file looks like this: 

{

'name': 'My theme Theme',

'description': 'This is my theme.',

'summary': 'This module provides feature for changing layout of theme.',

'category': 'Theme',

'version': '1.0',

'website': 'http://www.abc.com/',

'author': 'ABC',

'depends': ['website', 'website_less'],

'data': [

'views/layout.xml',

'views/homepage_layout.xml',

'views/pages.xml',

'views/assets.xml',

'views/snippets.xml'

],

'images':[

'static/description/splash_screen.png',

],

'application': True,

}


My locally tested working copy has Jquery version : 1.11.3. I wonder if it is the issue of jquery version and if that is the case how do i change the version of jquery inside "odoo" or is it the problem of some thing else. Also i am not sure of how to enable source map to identify which file has the error. 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/26/16, 8:33 AM
Seen: 654 times
Last updated: 4/26/16, 8:35 AM