Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
22412 Переглядів

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
152
1
груд. 23
3117
0
вер. 23
3047
1
жовт. 24
3686
5
лист. 19
5324