跳至內容
選單
此問題已被標幟
1 回覆
7720 瀏覽次數

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?


頭像
捨棄
最佳答案

How do you call this JS function ?

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
10月 23
2815
0
8月 23
194
1
2月 22
2573
4
12月 21
32362
2
12月 20
8832