我想sale_manager组添加到action_invoice_cancel
在(发票取消)按钮customer invoice
。 我的目的是看该按钮仅在sale_manager用户。 我想是这样的:
码
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="orchid_invoice_cancel_request_inherit" model="ir.ui.view">
<field name="name">invoice_cancel_request</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<button name="action_invoice_cancel" position="after">
<button string="Cancel Request" type="object" name="cancel_request" attrs="{'invisible':[('state','not in',('open','paid'))]}"/>
</button>
<field name = "move_id" position="after">
<field name = "od_cancel_reason" />
</field>
<button name="action_invoice_cancel" position="replace">
<button name="action_invoice_cancel" type="object" states="draft,proforma2,open" string="Cancel Invoice" groups="base.group_no_one,sales_team.group_sale_manager"/>
</button>
</field>
</record>
</odoo>
但它不工作。 该怎么办 ? 提前致谢。