OpenERP7.0 form_view_ref无法ref继承视图

时间:2014-01-15 05:35:23

标签: python-2.7 inheritance openerp-7

                  <field name="move_lines_qc" context="{'zuhu_id': supplier_id, 'form_view_ref':'view_stock_qc_form', 'tree_view_ref':'view_jp_stock_qc_tree'}" options='{"reload_on_button": true}'/>

以上记录在我的视图定义中,“form_view_ref”需要参考另一个视图view_stock_qc_form,

继承

<record id="view_stock_qc_form" model="ir.ui.view">
        <field name="name">jp.stock.qc.form</field>
        <field name="model">jp.stock.qc</field>
        <field name="inherit_id" ref="view_jp_move_picking_form"/>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='product_number']" position="replace">
                    <field name="product_number" string="From"/>
            </xpath>
        </field>
    </record>

没有继承

 <record id="view_stock_qc_form" model="ir.ui.view">
        <field name="name">jp.stock.qc.form</field>
        <field name="model">jp.stock.qc</field>
        <field name="arch" type="xml">
        <form string="Stock Moves" version="7.0">
            <header>
            </header>
            <group>
                <group>
                    <field name="product_id" on_change="onchange_product_id(product_id)" domain="[('zuhu_id','=',zuhu_id)]" context="{'default_zuhu_id':zuhu_id}" />
                    <field name="product_number" />
                    <field name="specifications" />
                    <field name="unqualified" />
                    <field name="instruction"  />
                 </group>
                <group>
                        <field name="product_qty"/>
                        <field name="product_qty_fact" />
                        <field name="product_uom"/>
                        <field name="create_date" invisible="1"/>
                        <field name="date"/>
                 </group>
              </group>
            </form>
        </field>
    </record>

如果没有继承,可以相关。虽然继承,但它是默认的。我想继承,我该怎么办?

0 个答案:

没有答案