title: How to correctly inherit an inherited view in odoo?
body: <p>I have been trying to target an inherited element in the view, but it's not working for me. </p>
  
  <p>So I have a <code>view</code> that inherits from the form view of <code>hr.contract</code> as shown here:</p>
  
  <pre class="lang-xml prettyprint-override"><code>  &lt;record id="hr_contract_view_form_cayor" model="ir.ui.view"&gt;
      &lt;field name="name"&gt;name&lt;/field&gt;
      &lt;field name="model"&gt;hr.contract&lt;/field&gt;
      &lt;field name="inherit_id" ref="hr_contract.hr_contract_view_form"/&gt;
      &lt;field name="arch" type="xml"&gt;
          &lt;data&gt;
              &lt;!-- more elements define with xpath --&gt;
              &lt;xpath expr="//field[@name='job_id']" position="after"&gt;
                  &lt;field name="retirement_age"/&gt;
              &lt;/xpath&gt;
              ...
              &lt;xpath expr="//page[@name='information']" position="after"&gt;
                  &lt;page string="Allowances" groups="hr_payroll.group_hr_payroll_user"&gt;
  
                      &lt;group&gt;
                          &lt;group name="allowances_group1"&gt;
                              ...
                              &lt;field name="car_allowance"/&gt;
                              ...
                          &lt;/group&gt;
                          &lt;group name="allowances_group2"&gt;
                              ...
                          &lt;/group&gt;
                      &lt;/group&gt;
                  &lt;/page&gt;
              &lt;/xpath&gt;
          &lt;/data&gt;
      &lt;/field&gt;
  &lt;/record&gt;
  </code></pre>
  
  <p>I have defined a new file to inherit from this <code>form view</code>, which adds a new <code>field</code> to it, as follows:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;record id="hr_contract.hr_contract_view_form_inherited" model="ir.ui.view"&gt;
      &lt;field name="name"&gt;hr.contract.grade.rank.form.inherit&lt;/field&gt;
      &lt;field name="model"&gt;hr.contract&lt;/field&gt;
      &lt;field name="inherit_id" ref="module.hr_contract_view_form_cayor"/&gt;
      &lt;field name="arch" type="xml"&gt;
           &lt;data&gt;
              &lt;xpath expr="//group[@name='allowances_group1']" position="inside"&gt;
                  &lt;field name="medical_allowance" /&gt;
              &lt;/xpath&gt; 
           &lt;/data&gt;
      &lt;/field&gt;
  &lt;/record&gt;
  </code></pre>
  
  <p>But when I upgrade my module, I get the following error:</p>
  
  <pre><code>Field `retirement_age` does not exist
  </code></pre>
  
  <p>How can I correctly inherit from the first one, and add my new field? </p>
  
  <p>Any help will be greatly appreciated, thanks in advance.</p>