请,我需要隐藏“费用报表批准”视图中的“批准”按钮,而无需进行任何代码更改,我使用odoo 11,并且我安装的模块是hr_expense。这是此视图的部分代码:
<form string="Expense Reports" class="o_expense_sheet" modifiers="{}">
<header modifiers="{}">
<button name="approve_expense_sheets" states="submit" string="Approve" type="object" class="oe_highlight o_expense_sheet_approve" modifiers="{'invisible':[['state','not in',['submit']]]}" options="{}"/>
<button name="action_sheet_move_create" states="approve" string="Post Journal Entries" type="object" class="oe_highlight o_expense_sheet_post" modifiers="{'invisible':[['state','not in',['approve']]]}" options="{}"/>
<button name="248" type="action" string="Register Payment" class="oe_highlight o_expense_sheet_pay" attrs="{'invisible': [('state', '!=', 'post')]}" context="{'default_amount': total_amount, 'partner_id': address_id}" modifiers="{'invisible':[['state','!=','post']]}" options="{}"/>
<button name="reset_expense_sheets" states="cancel" string="Resubmit" type="object" modifiers="{'invisible':[['state','not in',['cancel']]]}" options="{}"/>
<button name="247" states="submit,approve" context="{'hr_expense_refuse_model':'hr.expense.sheet'}" string="Refuse" type="action" modifiers="{'invisible':[['state','not in',['submit','approve']]]}" options="{}"/>
<field name="state" widget="statusbar" statusbar_visible="draft,submit,approve,post,done" on_change="1" modifiers="{'readonly':true,'required':true}"/>
</header>
<sheet modifiers="{}">
<div class="oe_button_box" modifiers="{}">
<button name="action_get_attachment_view" class="oe_stat_button" icon="fa-book" type="object" modifiers="{}" options="{}">
<field name="attachment_number" widget="statinfo" string="Documents" modifiers="{'readonly':true}"/>
</button>
</div>