0
                  <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>

如果没有继承,可以关联。而继承,它是默认的。我要继承,我该怎么办?

4

0 回答 0