Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
17578 Vues

Hello,

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

Avatar
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
mars 25
1218
0
nov. 24
1443
0
juin 24
1520
1
juin 24
1995
0
oct. 23
2062