Xml继承错误
-
我想在sale_order_line的form上添加两个字段,但是总报错
ValidateError Error occurred while validating the field(s) arch: Invalid XML for View Architecture!
<openerp>
3 <data>
4 <record model="ir.ui.view" id="sale_order_line_add_view">
5 <field name="name">sale.order.line.add.form</field>
6 <field name="model">sale.order</field>
7 <field name="inherit_id" ref="sale.view_order_form"/>
8 <field name="arch" type="xml">
9
16 <xpath expr="/form/sheet/notebook/page[@string='Order Lines']/field[@name='order_line']/form[@string='Sales Order Lines version=7 .0']/group/group/field[@name='price_unit']" position="after">
17 <field name="origin_price"/>
18 <field name="discount1"/>
19 </xpath>
20
21 </field>
22 </record>
23
24
25 </data>
26 </openerp> -
我后来把form[@string='Sales Order Lines version=7.0']/直接写成form就行了。我检查了form后面的字符串没错,搞不明白
-
[quote author=mrshelly link=topic=5960.msg14880#msg14880 date=1365584081]
[quote author=fanzhang1990 link=topic=5960.msg14878#msg14878 date=1365576214]
我后来把form[@string='Sales Order Lines version=7.0']/直接写成form就行了。我检查了form后面的字符串没错,搞不明白
[/quote]
因为你忘记输入 7.0 外面的引号了...
[/quote]
Mrshelly是明白人。