تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3147 أدوات العرض

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
أغسطس 19
2628
4
يوليو 19
9815
1
مارس 22
12806
1
يونيو 21
6293
2
ديسمبر 19
2796