Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
17593 Представления

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
1250
0
нояб. 24
1459
0
июн. 24
1537
1
июн. 24
2023
0
окт. 23
2084