odoo 字段后面添加button按钮,页签tree再加group显示字段


odoo 字段后面添加button按钮,页签tree再加group显示字段

字段后面添加button按钮

代码:

<field name="customs" position="replace">
    <label for="customs"/>
    <div>
        <field name="customs" string="船运提单号" nolabel='1'/>
        <button name="cargo_ship_select" string="船运信息查询" type="object" class="btn-primary"
                style='margin-left: 30px'/>
    </div>
</field>

效果:

页签tree再加group显示字段

代码:

<notebook class="tax-add-notebook" attrs="{'invisible': [('state', '!=', 'done')]}">
    <page class="tax-add-page" string="补税信息">
        <group>
            <div>
                <label for="customs_add_declaration"/>
                <field name="customs_add_declaration"
                       string="税单号"/>
            </div>
            <div>
                <label for="bill_add_date"/>
                <field name="bill_add_date"
                       string="税日期"/>
            </div>
        </group>
        <button name="generate_various_orders" 
                string="xxxx" 
                type="object"
                class="oe_highlight oe_read_only" 
                style="float: right"/>
        <field name="bill_tax_add_ids">
            <tree string="补税单明细行" editable="bottom">
                <field name="product_id" string="品名"/>
            </tree>
        </field>
    </page>
</notebook>

效果:


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM