Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
sie 19
2649
4
lip 19
9859
1
mar 22
12836
1
cze 21
6315
2
gru 19
2822