安装模块合同 hr_contract_state OpenERP /Odoo 8.0 时继承视图错误

Inherit view error when install module contract hr_contract_state OpenERP /Odoo 8.0

我安装了 Payroll 出勤汇总模块,我得到以下信息 错误:

ParseError: "ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition
Error details:
 Element '<xpath expr="//button[@string='Contracts']">' cannot be located in parent view

 Error context:
View `hr.employee.view.form.contract_state`
[view_id: 1112, xml_id: n/a, model: hr.employee, parent_id: 393]" while parsing file:///E:/ERP/odoo8/Odoo/odoo-8.0/openerp/addons/hr_contract_state  /hr_contract_view.xml:147, near
<record id="hr_hr_employee_view_form2" model="ir.ui.view">
    <field name="name">hr.employee.view.form.contract_state</field>
    <field name="model">hr.employee</field>
    <field name="inherit_id" ref="hr_contract.hr_hr_employee_view_form2"/>
    <field name="arch" type="xml">
        <data>
            <xpath expr="//button[@string='Contracts']" position="replace">
                <button name="%(hr_contract.act_hr_employee_2_hr_contract)d" string="Contracts" type="action" groups="base.group_hr_user"/>
            </xpath>
        </data>
    </field>
</record>

请帮助我,感谢您的帮助。

该视图中不存在该按钮。编辑该视图并尝试使用此视图(在数据标记之后):

<field name="contracts_count" position="replace">
    <button name="%(hr_contract.act_hr_employee_2_hr_contract)d" string="Contracts" type="action" groups="base.group_hr_user"/>
</field>

而不是 xpath。