콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
17568 화면

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
1208
0
11월 24
1435
0
6월 24
1501
1
6월 24
1987
0
10월 23
2055