跳至內容
選單
此問題已被標幟
3379 瀏覽次數

I have this code, file xml like this, I 've not created file js yet, because everytime i run with js file, my Odoo always lose all front-end display. So I'm not sure about this.

<? xml version = "1.0" encoding = "utf-8"?>

<Odoo>

   <Data>

       <template id = "assets_backend" name = "x_export_view assets" inherit_id = "web.assets_backend">

           <xpath expr = "." position = "inside">

               <script type="text/javascript" src="\XXX_Attendance_Custom\static\src\js\sync.js"></script>

           </xpath>

       </template>

   </data>

</odoo>
 
And this xml file to add button near Create and Import button

<?xml version="1.0" encoding="UTF-8"?>

    <templates id="sync_template" xml:space="preserve">

    <t t-extend="ListView.buttons">

    <t t-jquery="button.o_list_button_add" t-operation="replace">

    <t t-if="widget.modelName == 'list_reportformonth'">

    <button id="sync_button" class="btn btn-sm btn-default sync_button" type="button">Sync Data</button>

    </t>

    </t>

    </t>

   </templates>.

How can I create a new button? Any ideas? Thanks in advance

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
8月 19
2845
4
7月 19
10213
1
3月 22
13354
1
6月 21
6596
2
12月 19
3006