1
財務終了状態の別のモジュールに存在するステータス選択フィールドに基づいて、account.invoiceの「検証」ボタンを非表示にする必要があります。別のモジュールの状態に基づいてaccount.invoiceのValidateボタンを非表示にするにはどうすればいいですか?
隠す検証ボタンステータスがfinancial_close
<button name="invoice_open" states="draft" string="Validate" class="oe_highlight" groups="base.group_user"/>
であれば、金融近い状態に
'status': fields.selection([
('open', 'Open'),
('operation_close', 'Operation Closed'),
('financial_close', 'Financial Closed'),
('cancel', 'Cancel'),
], string="Status"),
にinvoice_openためのボタンの定義は、状態属性を使用して助けるかもしれません。したがって、あなたが気を付けて、それを上書きする必要があるかどうかを判断する必要があります。 Odooは州とattrsを組み合わせます。 – CZoellner