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

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 ?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ต.ค. 23
2759
0
ส.ค. 23
194
Odoo use which javascript framework? แก้ไขแล้ว
1
ก.พ. 22
2504
4
ธ.ค. 21
32130
odoo 9 show user popups แก้ไขแล้ว
2
ธ.ค. 20
8794