要件では
、次の効果のように、
ボタンをクリックできない状態にする必要があります。特定の状況を示すために、3つのボタンはクリックできません。
コードは次のとおりです。
<button string="技术通过" name="action_none" class="oe_highlight"
type="object" style="background-color: #e7e7e7; color: black;pointer-events: none;" attrs="{
'invisible': [('technical_pass','=', False),('state', '!=', 'reviewed')]}"/>
<button string="生产通过" name="action_none" class="oe_highlight"
type="object" style="background-color: #e7e7e7; color: black;pointer-events: none;" attrs="{
'invisible': [('production_pass','=', False),('state', '!=', 'reviewed')]}"/>
<button string="质检通过" name="action_none" class="oe_highlight"
type="object" style="background-color: #e7e7e7; color: black;pointer-events: none;" attrs="{
'invisible': [('quality_pass','=', False),('state', '!=', 'reviewed')]}"/>
def action_none(self):
"""按钮必须执行方法,不然报错,写次方法"""
return None
主にstyle = "pointer-events:none ;"を追加したボタンで、cssはクリックせず、Style is
style = "background-color:# e7e7e7; color:black; router-events:none;"
なので、上記の場合があります。のスタイルと機能