Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
17556 Vizualizări

Hello,

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

Imagine profil
Abandonează
Cel mai bun răspuns

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 -->

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
mar. 25
1201
0
nov. 24
1432
0
iun. 24
1490
1
iun. 24
1983
0
oct. 23
2049