Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
17571 Visninger

Hello,

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

Avatar
Kassér
Bedste svar

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
Kassér
Related Posts Besvarelser Visninger Aktivitet
1
mar. 25
1210
0
nov. 24
1436
0
jun. 24
1501
1
jun. 24
1988
0
okt. 23
2055