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

want to add a javascript file to manipulate the posTicket, I created an addon that inherits from the PosTicket so i can be able to modify the reciept, I want to use javascript so i can manipulate the reciept dynamically (add qrcode..)..

how can I add javascript file to the module I created ?



อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

you can add a static folder on your custom module directory, and create a js file

custom-module

    --> static

            --> js

                --> filename.js

after that don't forget to add it in backend assets.

eg:

<!-- add css / js -->
<template id="assets_backend" name="js assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script
type="text/javascript"
src="/path/filename.js">
        </script>
<link
href="/custom_module_name/static/src/css/filenmae.css"
rel="stylesheet"
type="text/css"/>
</xpath>
</template>


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Have a look at this link : https://www.cybrosys.com/blog/how-to-add-css-javascript-in-odoo

Thanks

อวตาร
ละทิ้ง

Screenshot for code? Are you kidding me?

Related Posts ตอบกลับ มุมมอง กิจกรรม
4
ก.ค. 25
363
1
ธ.ค. 23
3232
0
ก.ย. 23
3132
1
ต.ค. 24
3737
Odoo 12: Modules not visible in apps แก้ไขแล้ว
5
พ.ย. 19
5394