我收到外部ID未找到错误

时间:2017-02-16 15:09:39

标签: odoo-8

ParseError: "External ID not found in the system: hr_contract.hr_hr_employee_view_form2" while parsing /opt/openerp/odoo/FMPay-Devlopment--master/hr_extended/hr_extended_view.xml:688, near
<record id="view_employee_rate_inherited_form" model="ir.ui.view">
            <field name="name">employee.inherited.rate.form</field>
            <field name="model">hr.employee</field>
            <field name="inherit_id" ref="hr_contract.hr_hr_employee_view_form2"/>
            <field name="arch" type="xml">
                <xpath expr="//group[@string='Contract']/field[@name='medic_exam']" position="before">
                        <field name="employee_type"/> 
                        <field name="reg_rate"/>
                </xpath>enter code here
            </field>
        </record>

这是我的代码。我收到了这个错误。我不知道我必须检查的地方。

2 个答案:

答案 0 :(得分:0)

请检入__openerp_.p文件

  

取决于&#39;:[&#39; base&#39;&#39; hr&#39;,&#39; hr_contract&#39;],

答案 1 :(得分:0)

要引用在另一个模块中定义的任何视图ID,您应该依赖该模块。

请在 openerp .py文件中指定它作为depends键的值

    {
      #all other things goes here

    'depends': [
          ####
          'hr_contract',
          ####
         ],

      #all other things goes here
   }