Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
17562 Widoki

Hello,

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
mar 25
1204
0
lis 24
1434
0
cze 24
1492
1
cze 24
1984
0
paź 23
2053