Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
7675 Zobrazení

Hello,

I created button in my tree view and want on this button click call js function ("add an item").

I created test.xml file

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <template id="assets_backend" inherit_id="web.assets_backend">
            <xpath expr="." position="inside">
                <script type="text/javascript" src="/purchase_request/static/src/js/test.js"></script>
            </xpath>
        </template>
    </data>
</openerp>


then test.jsfor test

console.log("test");


Added these files to manifest:


'js': ["static/src/js/test.js"],

   'qweb' : [
       'static/src/xml/test.xml'
    ],


But nothing. How can I do that?


Avatar
Zrušit
Nejlepší odpověď

How do you call this JS function ?

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
říj 23
2780
0
srp 23
194
1
úno 22
2540
4
pro 21
32270
2
pro 20
8810