zoukankan      html  css  js  c++  java
  • How to add a button in the seletions "More"

    <?xml version="1.0" encoding="utf-8"?>
    <openerp>
        <data>
            <record id="view_sale_order_make_invoice" model="ir.ui.view">
                <field name="name">Create invoices</field>
                <field name="model">sale.make.invoice</field>
                <field name="arch" type="xml">
                    <form string="Create invoices" version="7.0">
                        <separator colspan="4" string="Do you really want to create the invoice(s)?" />
                        <group>
                            <field name="grouped"/>
                            <field name="invoice_date"/>
                        </group>
                        <footer>
                            <button name="make_invoices" string="Create Invoices" type="object" class="oe_highlight"/>
                            or
                            <button string="Cancel" class="oe_link" special="cancel" />
                        </footer>
                   </form>
                </field>
            </record>
    
            <record id="action_sale_order_make_invoice" model="ir.actions.act_window">
                <field name="name">Make Invoices</field>
                <field name="type">ir.actions.act_window</field>
                <field name="res_model">sale.make.invoice</field>
                <field name="view_type">form</field>
                <field name="view_mode">form</field>
                <field name="view_id" ref="view_sale_order_make_invoice"/>
                <field name="target">new</field>
                <field name="multi">True</field>
            </record>
    
            <record model="ir.values" id="sale_order_make_invoice">
                <field name="model_id" ref="sale.model_sale_order" />
                <field name="name">Make Invoices</field>
                <field name="key2">client_action_multi</field>
                <field name="value" eval="'ir.actions.act_window,' + str(ref('action_sale_order_make_invoice'))" />
                <field name="key">action</field>
                <field name="model">sale.order</field>
            </record>
        </data>
    </openerp>

    Key points:

    <field name="multi">True</field>

    and

     1 <record model="ir.values" id="sale_order_make_invoice">
     2             <field name="model_id" ref="sale.model_sale_order" />
     3             <field name="name">Make Invoices</field>
     4             <field name="key2">client_action_multi</field>
     5             <field name="value" eval="'ir.actions.act_window,' + str(ref('action_sale_order_make_invoice'))" />
     6             <field name="key">action</field>
     7             <field name="model">sale.order</field>
     8         </record>
     9 
    10 
    11 
    12 myselft Note:
    13 in wizard xml file write:    <field name="multi">True</field>
    14 second:
    15 
    16 <record model="ir.values" id="pcb_several_make_pcb_severalone">
    17             <field name="model_id" ref="pcb_several.model_pcb_several" />
    18             <field name="name">PCB Several One</field>
    19             <field name="key2">client_action_multi</field>
    20             <field name="value" eval="'ir.actions.act_window,' + str(ref('action_password_several'))" />
    21             <field name="key">action</field>
    22             <field name="model">pcb.several</field>
    23         </record>
  • 相关阅读:
    sqlserver日期推算
    bcp sqlserver 导入 导出 数据
    sqlserver 2008 序列号
    mysql 学习总结
    使用Eclipse对JUnit测试函数进行Debug时断点无效问题
    ORACLE死锁故障排查的一般性手法的备忘录
    BigDecimal进行Format时产生的[java.lang.IllegalArgumentException: Digits < 0]异常
    Java中keySet()返回值的排序问题
    严蔚敏数据结构视频教程下载
    C、C++经典书籍
  • 原文地址:https://www.cnblogs.com/chjbbs/p/3904670.html
Copyright © 2011-2022 走看看