-使用完整代码编辑-
我有家长的看法:
<record model="ir.ui.view" id="view_wpa_publication_form">
<field name="name">WPA Publication View Form</field>
<field name="model">wpa.publication</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Publications">
<group colspan="4" col="6">
<field name="name" on_change="onchange_publication(name)" colspan="4"/>
<field name="active"/>
<field name="issn"/>
<field name="supplier_id"/>
<field name="periodicity"/>
</group>
<separator string="Editions" colspan="2"/>
<separator string="Ad Categories" colspan="2"/>
<field name="edition_ids" mode="tree" colspan="2" nolabel="1">
<tree string="" editable="bottom">
<field name="date"/>
</tree>
<form>
<field name="publication_id"/>
<field name="date"/>
</form>
</field>
<field name="category_ids" mode="tree" colspan="2" nolabel="1">
<tree string="" editable="bottom">
<field name="category_id"/>
<field name="price"/>
<field name="functioning"/>
</tree>
<form>
<field name="publication_id"/>
<field name="category_id"/>
<field name="price"/>
<field name="functioning"/>
</form>
</field>
</form>
</field>
</record>
所以我有一个子视图,我想在一个有 2 页(标签)的笔记本中转换我的名字和我的名字 2
我有正确的 Xpath 用选项卡替换这两个字段,但我无法将机器人页面放在同一个笔记本中:
<xpath expr="//separator[@string='Editions']" position="replace"/>
<xpath expr="//field[@name='edition_ids']" position="replace">
<notebook colspan="4">
<page string="Editions">
<field name="edition_ids" mode="tree" colspan="2" nolabel="1">
<tree string="" editable="bottom">
<field name="date"/>
</tree>
<form>
<field name="publication_id"/>
<field name="date"/>
</form>
</field>
</page>
<page string="Ad Categories">
<field name="category_ids" mode="tree" colspan="2" nolabel="1">
<tree string="" editable="bottom">
<field name="category_id"/>
<field name="price"/>
<field name="functioning"/>
</tree>
<form>
<field name="publication_id"/>
<field name="category_id"/>
<field name="price"/>
<field name="functioning"/>
</form>
</field>
</page>
<page string="Awards">
<field name="publication_id" mode="tree" colspan="2" nolabel="1">
<tree string="" editable="bottom">
<field name="award"/>
</tree>
<form>
<field name="award"/>
</form>
</field>
</page>
</notebook>
</xpath>
<xpath expr="//separator[@string='Ad Categories']" position="replace"/>
<xpath expr="//field[@name='category_ids']" position="replace">
<notebook colspan="4">
</notebook>
</xpath>