Skip to Content
Menu
This question has been flagged

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

Avatar
Discard
Related Posts Replies Views Activity
1
Aug 19
2143
4
Jul 19
9075
1
Mar 22
11721
1
Jun 21
5612
2
Dec 19
2342