odooボタンはクリックできません

要件では
、次の効果のように、
ここに画像の説明を挿入
ボタンクリックできない状態にする必要があります特定の状況を示すために、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;"
なので、上記の場合があります。のスタイルと機能

おすすめ

転載: blog.csdn.net/weixin_42464956/article/details/110244905