Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3391 Ansichten

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Aug. 19
2867
4
Juli 19
10228
1
März 22
13388
1
Juni 21
6625
2
Dez. 19
3031