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