İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
18052 Görünümler

Hello,

how to make an xml condition in base.xml to check the source model

Avatar
Vazgeç
En İyi Yanıt

Using the below code you can check the source module t-if="widget.model == 'module.name'"

Example using the below code i changed the 'Create' button name in my custom module.

<!-- The Below code is Modified to change the Save button name in Custom Module -->
            <button t-if="widget.is_action_enabled('create') and widget.model != 'module.name'"
                type="button" class="oe_button oe_form_button_create" accesskey="C">Create</button>
            <button t-if="widget.is_action_enabled('create') and widget.model == 'module.name'"
                type="button" class="oe_button oe_form_button_create" accesskey="C">Add Record</button>         <!-- END -->

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Mar 25
2335
0
Kas 24
2158
0
Haz 24
2032
1
Haz 24
2600
0
Eki 23
2634