を私はビューmrp_workorder_variation.mrp_production_workcenter_form_view_inherit_2
を継承し、新しいページを追加するが、それが示されていないよ、私はなぜ知らない、これは私のコードです:- OdooのV8
<record id="mrp_production_workcenter_form_view_inherit_3" model="ir.ui.view">
<field name="name">MRP Production Work Book Block</field>
<field name="model">book.block.code</field>
<field name="inherit_id" ref="mrp_workorder_variation.mrp_production_workcenter_form_view_inherit_2"/>
<field name="arch" type="xml">
<xpath expr="//page[@string='Input/Output Products']" position="after">
<page string="Book Block">
<group>
<group string="Book Block">
<field name="name"/>
<field name="description"/>
</group>
</group>
</page>
</xpath>
</field>
</record>
これは、元のビュー私は継承しています:
<record id="mrp_production_workcenter_form_view_inherit_2" model="ir.ui.view">
<field name="name">MRP Production Workcenter Line</field>
<field name="model">mrp.production.workcenter.line</field>
<field name="inherit_id" ref="mrp_operations.mrp_production_workcenter_form_view_inherit"/>
<field name="arch" type="xml">
<xpath expr="//page[@string='Information']" position="after">
<page string="Input/Output Products">
<group>
<group string="Input Products">
<field name="mrp_workorder_variation_line_ids" nolabel="1"
attrs="{'readonly': [('state','!=','draft')]}">
<tree string="Input Product" editable="bottom">
<field name="product_id"
on_change="on_change_product_uom(product_id)"/>
<field name="product_uom"/>
<field name="product_qty"/>
</tree>
<form string="Input Product" version="7.0">
<field name="product_id"/>
<field name="product_uom"/>
<field name="product_qty"/>
</form>
</field>
</group>
</group>
<group>
<group string="Output Products">
<field name="mrp_workorder_variation_output_line_ids" nolabel="1"
attrs="{'readonly': [('state','!=','startworking')]}">
<tree string="Output Product" editable="bottom">
<field name="product_id"
on_change="on_change_product_uom(product_id)"/>
<field name="product_uom"/>
<field name="product_qty"/>
</tree>
<form string="Output Product" version="7.0">
<field name="product_id" />
<field name="product_uom"/>
<field name="product_qty"/>
</form>
</field>
</group>
</group>
</page>
</xpath>
</field>
</record>
これはなぜ起こっているのですか?
私も元の<xpath expr="//page[@string='Information']"
を継承しようとしましたが、同じ結果、新しいページは表示されません。
ありがとうございます!
EDIT
私はこのように変更した場合:
まだ新しいページが、私はあなたが選択することが許可されていると思ういけない
元のビューはどのモジュールですか? mrpで??こんにちは、それはmrp_operations " –
をですビューファイルをopenerpマニフェストファイルに登録しました。 – NeoVe
次にREF =「mrp_operations.view_id_of _original_view_you_want_to_inherit」 –