Error details: Field `af` does not exist
<p>I am getting this error for 2 days.
I have read any links regarding the same error and each time no effect.</p>

<p>I am trying simple inheritance
Here is my <code>employee.py</code> file</p>

<pre><code>class Employee(models.Model):
    _inherit = 'hr.employee'
    _description = "Inherited modules"

    af = fields.Char(string="AF")
</code></pre>

<p>Here is my <code>employee.xml</code> file</p>

<pre><code>&lt;openerp&gt;
    &lt;data&gt;
        &lt;record id="hr_employee_contact_form_view" model="ir.ui.view"&gt;
            &lt;field name="name"&gt;hr.employee&lt;/field&gt;
            &lt;field name="model"&gt;hr.employee&lt;/field&gt;
            &lt;field name="inherit_id" ref="hr.view_employee_form" /&gt;
            &lt;field name="arch" type="xml"&gt;
                &lt;notebook position="inside"&gt;
                    &lt;page string="Contact"&gt;
                        &lt;group&gt;
                            &lt;field name="af"/&gt;
                        &lt;/group&gt;
                    &lt;/page&gt;
                &lt;/notebook&gt;
            &lt;/field&gt;
        &lt;/record&gt;

        &lt;record model="ir.actions.act_window" id="employee_list_action"&gt;
            &lt;field name="name"&gt;Contacts&lt;/field&gt;
            &lt;field name="res_model"&gt;hr.employee&lt;/field&gt;
            &lt;field name="view_mode"&gt;tree,form&lt;/field&gt;
        &lt;/record&gt;
        &lt;menuitem id="configuration_menu" name="Configuration"
                  parent="main_ayda_project_menu"/&gt;
        &lt;menuitem id="contact_menu" name="Employee"
                  parent="configuration_menu"
                  action="employee_list_action"/&gt;
    &lt;/data&gt;
&lt;/openerp&gt;
</code></pre>

<p>Here is my <code>__openerp__.py</code> file</p>

<pre><code># -*- coding: utf-8 -*-
{
    'name': "Smart Gateway",

    'summary': """ Smart Gateway """,

    'description': """
        Long description of module's purpose
    """,

    'author': "My Company",
    'website': "http://www.yourcompany.com",

    'category': 'Uncategorized',
    'version': '0.1',

    'depends': ['base',
                'hr'],

    'data': [
        # 'security/ir.model.access.csv',
        # 'views/views.xml',
        'views/templates.xml',
        'views/contact_master/contact.xml',
        'views/employee.xml'
    ],
    # only loaded in demonstration mode
    'demo': [
        'demo/demo.xml',
    ],
}
</code></pre>

<p>And here is my <code>__init__.py</code> file</p>

<pre><code>from . import controllers
from . import models
</code></pre>

<p>I have taken care of dependency also still getting this error.</p>

<pre><code>ParseError: "Invalid view definition

Error details:
Field `af` does not exist

Error context:
View `hr.employee`
[view_id: 1859, xml_id: n/a, model: hr.employee, parent_id: 352]
None" while parsing file:///C:/Odoo%209.0-20160127/server/openerp/addons/ayda_project/views/employee.xml:3, near
&lt;record id="hr_employee_contact_form_view" model="ir.ui.view"&gt;
            &lt;field name="name"&gt;hr.employee&lt;/field&gt;
            &lt;field name="model"&gt;hr.employee&lt;/field&gt;
            &lt;field name="inherit_id" ref="hr.view_employee_form"/&gt;
            &lt;field name="arch" type="xml"&gt;
                &lt;notebook position="inside"&gt;
                    &lt;page string="Contact"&gt;
                        &lt;group&gt;
                            &lt;field name="af"/&gt;
                        &lt;/group&gt;
                    &lt;/page&gt;
                &lt;/notebook&gt;
            &lt;/field&gt;
        &lt;/record&gt;
</code></pre>

<p>Add your employee.py file into an __init__.py file in the same directory.
If it is in the same directory as your other .py files.</p>

<pre><code>from . import controllers
from . import models
from . import employee
</code></pre>

<p>Update your addon</p>

python orm openerp odoo-8 odoo-9