コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
17558 ビュー

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
1202
0
11月 24
1433
0
6月 24
1491
1
6月 24
1983
0
10月 23
2051