跳至內容
選單
此問題已被標幟
1 回覆
17551 瀏覽次數

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
3月 25
1199
0
11月 24
1431
0
6月 24
1490
1
6月 24
1981
0
10月 23
2046