odoo 在form视图sheet右上角增加按钮

一、效果

 

 

 

 二、实现方法

增加以下代码即可

<div class="oe_button_box" name="button_box">
    <button type="object"
            class="oe_stat_button" icon="fa-user-secret">
        <field string="手上数量" name="name"
               widget="statinfo"  modifiers="{'readonly':true}"/>
    </button>
</div>                

 

posted @ 2019-09-06 10:15  西红柿炒番茄!  阅读(824)  评论(0编辑  收藏  举报