Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
17666 Visualizzazioni

Hello,

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

Avatar
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
mar 25
1442
0
nov 24
1610
0
giu 24
1635
1
giu 24
2149
0
ott 23
2178