例如下面提到的代码
<button name="invoice_recreate" string="Recreate Invoice"/>
<button name="invoice_corrected" string="Ignore Exception" />
答案 0 :(得分:0)
将字段选择添加到视图,并将attrs属性添加到按钮,如下所示:
<field name="selection_field" invisible="1" />
<button name="invoice_recreate"
string="Recreate Invoice"
attrs="{'invisible': [('selection_field', '=', 'value')]}" />
<button name="invoice_corrected"
string="Ignore Exception"
attrs="{'invisible': [('selection_field', '!=', 'value')]}" />
我不确定这是否是您要的东西,请问您是否有其他疑问