Skip to Content
Menú
This question has been flagged
1 Respondre
17588 Vistes

Hello,

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

Avatar
Descartar
Best Answer

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
Descartar
Related Posts Respostes Vistes Activitat
1
de març 25
1237
0
de nov. 24
1450
0
de juny 24
1526
1
de juny 24
2018
0
d’oct. 23
2071