Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
17690 Vistas

Hello,

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

Avatar
Descartar
Mejor respuesta

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
Publicaciones relacionadas Respuestas Vistas Actividad
1
mar 25
1466
0
nov 24
1619
0
jun 24
1637
1
jun 24
2163
0
oct 23
2188