title: Form view for inherited field in odoo 12
body: <p>I have created a new model. That model inherits other models. Which means my model contains fields of inherited models. Now I am creating a form view of my custom model and in that form view displaying an inherited model field.
  But the problem is that after displaying the field in view it will display their default view and not the new defined view.</p>
  
  <p>Following is the code:</p>
  
  <p>sample.py</p>
  
  <pre><code>
  class SurveyCreate(models.Model):
  
      _name = 'survey.create'
      _inherit = ['survey.survey','survey.question','survey.page']
  </code></pre>
  
  <p>sample_view.Xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;odoo&gt;
  &lt;data&gt;
  
      &lt;record id="survey_create_form" model="ir.ui.view"&gt;
      &lt;field name="name"&gt;Survey Form&lt;/field&gt;
      &lt;field name="model"&gt;survey.create&lt;/field&gt;
      &lt;field name="arch" type="xml"&gt;
          &lt;form&gt;
              &lt;sheet&gt;
                  &lt;group&gt;&lt;!-- survey.survey  --&gt;
                      &lt;field name="title"/&gt;
                  &lt;/group&gt;
  
                   &lt;group&gt;
                      &lt;h2&gt;survey_survey one2many &lt;/h2&gt;
                      &lt;field name="page_ids" mode="tree"/&gt;
                      &lt;tree&gt;
                          &lt;field name="title"/&gt;
                          &lt;field name="question_ids"/&gt;
                          &lt;control&gt;
                              &lt;create name="Add Page"/&gt;
                          &lt;/control&gt;
                      &lt;/tree&gt; 
                  &lt;/group&gt;
  
                  &lt;group col="4" colspan="2"&gt;&lt;!-- survey.question  --&gt;
                      &lt;field name="question"/&gt;
                      &lt;field name="type"/&gt;
                  &lt;/group&gt;
              &lt;/sheet&gt;
          &lt;/form&gt;
      &lt;/field&gt;
      &lt;/record&gt;
  
      &lt;record id="survey_create_action" model="ir.actions.act_window"&gt;
      &lt;field name="name"&gt;Survey Action&lt;/field&gt;
      &lt;field name="res_model"&gt;survey.create&lt;/field&gt;
      &lt;field name="view_type"&gt;form&lt;/field&gt;
      &lt;field name="view_mode"&gt;tree,form&lt;/field&gt;
      &lt;field name="help" type="html"&gt;
          &lt;p class="oe_view_noncontent_create"&gt;
              Create Survey
          &lt;/p&gt;
      &lt;/field&gt;
      &lt;/record&gt;
  
      &lt;menuitem id="main_menu" name="Survey Create" action="survey_create_action"/&gt;
  &lt;/data&gt;
  &lt;/odoo&gt;
  </code></pre>
  
  <p>I hope provided decription is clear. If not then please let me know. Also I have attached screen short of form view. or any other alternate way?</p>
  
  <p><a href="https://i.stack.imgur.com/xgxWP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xgxWP.png" alt="Wrong form view for inherited fields"></a></p>