Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
7811 Visualizzazioni

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
Abbandona
Risposta migliore

How do you call this JS function ?

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
ott 23
2895
0
ago 23
194
1
feb 22
2692
4
dic 21
32673
2
dic 20
8914