Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
17552 Zobrazení

Hello,

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

Avatar
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
bře 25
1200
0
lis 24
1431
0
čvn 24
1490
1
čvn 24
1983
0
říj 23
2048