Odoo 9 コミュニティ バージョンを使用しています。
販売注文フォームには次のボタンがあります。
<button name="action_confirm" states="sent" string="Confirm Sale" class="btn-primary" type="object" context="{'show_sale': True}"/>
<button name="action_confirm" states="draft" string="Confirm Sale" type="object" context="{'show_sale': True}"/>
ビューから両方のボタンを非表示にしようとしています。だから私は次のコードで試しました。
<record model="ir.ui.view" id="hide_so_confirm_button_form">
<field name="name">hide.so.confirm.button.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<button name="action_confirm" position="attributes">
<attribute name="invisible">1</attribute>
</button>
</field>
</record>
次の属性も試しました:
<attribute name="states"></attribute>
上記のコードでは、最初のボタンのみを非表示/影響します。
質問:
両方の販売確認ボタンを非表示にする方法は?