title: ODOO Element cannot be located in parent view
body: <p>I m trying to compile a module but it shows me this error </p>
  
  <pre><code>Element '&lt;group name="sale_condition"&gt;' cannot be located in parent view
  
  Error context:
  View `product.template.only.form.view.marge`
  [view_id: 1240, xml_id: n/a, model: product.template, parent_id: 560]
  None" while parsing /home/PycharmProjects/account_invoice_margin/views/product_view.xml:4, near
  &lt;record id="product_template_only_form_view_marge" model="ir.ui.view"&gt;
              &lt;field name="name"&gt;product.template.only.form.view.marge&lt;/field&gt;
              &lt;field name="model"&gt;product.template&lt;/field&gt;
              &lt;field name="inherit_id" ref="stock.view_template_property_form"/&gt;
              &lt;field name="arch" type="xml"&gt;
                  &lt;group name="sale_condition" position="inside"&gt;
                      &lt;label for="taux_marge" groups="account_invoice_margin.group_margin_security"/&gt;
                      &lt;div groups="account_invoice_margin.group_margin_security"&gt;
                          &lt;field name="taux_marge" class="oe_inline"/&gt;
                      &lt;/div&gt;
                      &lt;label for="marge_product" groups="account_invoice_margin.group_margin_security"/&gt;
                      &lt;div groups="account_invoice_margin.group_margin_security"&gt;
                          &lt;field name="marge_product" class="oe_inline"/&gt;
                      &lt;/div&gt;
                  &lt;/group&gt;
              &lt;/field&gt;
          &lt;/record&gt;
  </code></pre>
  
  <p><strong>I understand that the error is due to "sale_condition" that is not in the parent view. Can you help me by giving me an alternative, where can I add this group to make it work? Knowing that I can not change in the addons file</strong></p>
  
  <p>This group with the attribute 'sale_condition' is present in odoo 10 mais pas dans odoo 12.</p>
  
  <pre><code>&lt;group name="sale_condition" string="Sale Conditions"&gt;
                              &lt;label for="warranty" groups="stock.group_production_lot"/&gt;
                              &lt;div groups="stock.group_production_lot"&gt;
                                  &lt;field name="warranty" class="oe_inline"/&gt; months
                              &lt;/div&gt;
                              &lt;label for="sale_delay"/&gt;
                              &lt;div&gt;
                                  &lt;field name="sale_delay" attrs="{'readonly':[('sale_ok','=',False)]}" class="oe_inline" style="vertical-align:baseline"/&gt; days
                              &lt;/div&gt;
  </code></pre>