Skip to Content
मेन्यू
This question has been flagged
1 Reply
17542 Views

Hello,

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

Avatar
Discard
Best Answer

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

Avatar
Discard
Related Posts Replies Views Activity
1
मार्च 25
1182
0
नव॰ 24
1425
0
जून 24
1489
1
जून 24
1966
0
अक्तू॰ 23
2040