Я использую версию сообщества 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>
С приведенным выше кодом это только первая кнопка скрытия/влияния.
Вопрос:
Как скрыть обе кнопки Подтвердить продажу?