Odoo Help


How to inherit external script in web backend

on 1/31/18, 7:25 AM 879 views

I need the table with  Fixed Columns so am including script files from below link


<template id="fc_assets_backend" name="account assets" inherit_id="web.assets_backend">

<xpath expr="." position="inside">

<script type="text/javascript" src="/purchase_requisition/static/src/js/dataTables.fixedColumns.js"></script>

<script type="text/javascript" src="/purchase_requisition/static/src/js/jquery.dataTables.js"></script>

<script type="text/javascript" src="/web/static/lib/jquery/jquery.js"></script>

<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.css" />

<link rel="stylesheet" href="https://cdn.datatables.net/fixedcolumns/3.2.4/css/fixedColumns.dataTables.css" />



Getting below error:

web.assets_backend.js:2824 Could not get content for jquery-1.12.4.js defined in bundle 'web.assets_backend'.

(anonymous) @ web.assets_backend.js:2824

web.assets_backend.js:2827 Could not get content for /js/jquery.dataTables.js defined in bundle 'web.assets_backend'.

(anonymous) @ web.assets_backend.js:2827

web.assets_backend.js:2830 Could not get content for /fixedcolumns/3.2.4/js/dataTables.fixedColumns.js defined in bundle 'web.assets_backend'.

(anonymous) @ web.assets_backend.js:2830

web.assets_backend.js:2795 Uncaught TypeError: $(...).DataTable is not a function

Please help me to resolve this error


Hilar AK

--Hilar AK--
--Hilar AK--



Experienced Odoo developer, Functional Consultant. Happy to help in the development and also functional consultation.

Hilar AK
On 2/1/18, 1:11 AM

you dont need to include the jquery lib, and also cdn will not accepted I think.

So download the lib and include it under your custom addon and give the path within the script tag.

<script type="text/javascript" src="/purchase_requisition/static/src/js/dataTables.fixedColumns.js"></script>

<script type="text/javascript" src="/purchase_requisition/static/src/js/jquery.dataTables.js"></script> Cant get function from this file

on 2/4/18, 11:19 PM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/31/18, 7:25 AM
Seen: 879 times
Last updated: 2/1/18, 1:11 AM