【发布时间】:2020-07-03 13:53:48
【问题描述】:
我的列表视图中有一个自定义按钮“查看全部”,我希望它只对具有特定组访问权限的用户可见,我该如何实现?
我尝试为按钮添加组属性,但没有成功,
<template xml:space="preserve">
<t t-extend="ListView.buttons">
<t t-jquery="button.o_list_button_add" t-operation="before">
<button t-if="widget.modelName == 'leave.request.allocation'" type="button" class="btn btn-primary btn-sm oe_filter_button" accesskey="f" groups="hr_holidays.group_hr_holidays_manager">
View All
</button>
</t>
</t>
【问题讨论】: