Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
6138 มุมมอง

Hi,

i need to import external jquery libraries and css for pivot table for frontend views...

I add this code to assets.xml file

<odoo>
<data>
<template id="assets_frontend" name="Website Report" inherit_id="website.assets_frontend">
<xpath expr="." position="inside">
<!-- Pivot table links-->
<script type="text/javascript" src='https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js'/>
<script type="text/javascript" src='https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js'/>
<script type="text/javascript" src='https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js'/>
<script type="text/javascript" src='https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.11/c3.min.js'/>
<link rel="stylesheet" href='https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.11/c3.min.css'/>
<link rel="stylesheet" href='https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.13.0/pivot.min.css'/>
<script type="text/javascript" src='https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.14.0/pivot.min.js'/>
<script type="text/javascript" src='https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.14.0/c3_renderers.min.js'/>
<!-- Local links-->
<link rel='stylesheet' href='/website_report/static/src/css/website_report.css'/>
<script type="text/javascript" src="/website_report/static/src/js/pivot_statistics.js"/>
</xpath>
</template>
</data>
</odoo>

The problem is that local resources are loaded without problems...but external are loaded only if i set debug=assets...

I'm wrong with something?

There are other ways to do that?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ธ.ค. 18
3265
0
ต.ค. 19
2082
0
ม.ค. 18
2504
1
เม.ย. 24
4549
2
ก.ค. 24
2275