Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
17590 Переглядів

Hello,

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

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
бер. 25
1241
0
лист. 24
1454
0
черв. 24
1526
1
черв. 24
2020
0
жовт. 23
2078