在odoo8中安装我的模块(打开erp 7)时,我收到此错误。请帮帮我。
ParseError: "ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition
Error details:
Invalid predicate" while parsing /home/anipr/Desktop/odoo-8.0/openerp /addons/transtech_module/configuration_panel_view.xml:166, near
<record model="ir.ui.view" id="res_user_tree_view_extend">
<field name="name">res.user.tree.inherit</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_tree"/>
<field name="arch" type="xml">
<data><xpath expr="//field[@name='date'" position="replace">
</xpath>
<field name="lang" position="after">
<field name="role"/>
<field name="contact_num"/>
<field name="joining_date"/>
</field>
</data></field>
</record>
答案 0 :(得分:2)
您的字符串尚未关闭[
。
expr="//field[@name='date'"
很糟糕,因为它错过了最后的]
expr="//field[@name='date']"
是对的。
答案 1 :(得分:0)
]
标记中缺少 xpath
,xml代码应为:
<record model="ir.ui.view" id="res_user_tree_view_extend">
<field name="name">res.user.tree.inherit</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_tree"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='date']" position="replace">
</xpath>
<field name="lang" position="after">
<field name="role"/>
<field name="contact_num"/>
<field name="joining_date"/>
</field>
</data>
</field>