title: Error Element '<xpath expr="//form/footer/button[@name='create_payment']" name="">' cannot be located in parent view
body: <p>Why I am getting this error:</p>
  
  <pre><code>Element '&lt;xpath expr="//form/footer/button[@name='create_payment']" 
  name=""&gt;' cannot be located in parent view
  
  Error context:
  View `account.register.payments.wizard.from.invoices.inherited`
  [view_id: 660, xml_id: 
  account_bankgiro_payment_file.view_account_payment_from_invoices_inherit_account_bankgiro, model: account.register.payments, parent_id: 384]
  None" while parsing /home/prachh/odoo-new/11/apps/account_bankgiro_payment_file/views/inherited_account_register_payments.xml:11, near
  </code></pre>
  
  <p></p>
  
  <p>while everything seems correct? Here is my code:</p>
  
  <pre><code>        &lt;record id="view_bankgiro_transfer_download" model="ir.ui.view"&gt;
              &lt;field name="name"&gt;account.payment.bankgiro.download&lt;/field&gt;
              &lt;field name="model"&gt;account.payment.bankgiro&lt;/field&gt;
              &lt;field name="arch" type="xml"&gt;
                  &lt;form string="Download BankGiro Transfer File" version="7.0"&gt;
                      &lt;group&gt;
                          &lt;p class="oe_grey" colspan="4"&gt;
                             Click on the file to save it somewhere on your computer. Then upload that file on your bank's homebanking website.
                          &lt;/p&gt;
                          &lt;field name="file" filename="filename"/&gt;
                          &lt;field name="filename" invisible="True"/&gt;
                      &lt;/group&gt;
                      &lt;group&gt;
                      &lt;/group&gt;
                      &lt;footer&gt;
                          &lt;button string="Cancel" class="oe_link" special="cancel" invisible="1"/&gt;
                      &lt;/footer&gt;
                  &lt;/form&gt;
              &lt;/field&gt;
          &lt;/record&gt;
  
           &lt;record id="inv_bankgiro_pay_tree" model="ir.ui.view"&gt;
              &lt;field name="name"&gt;account.bankgiro.pay.tree&lt;/field&gt;
              &lt;field name="model"&gt;account.payment.bankgiro&lt;/field&gt;
              &lt;field name="arch" type="xml"&gt;
                  &lt;form string="Invoices to be paid via BankGiro"&gt;
                      &lt;field name="vendor_invoice"&gt;
                          &lt;tree editable="bottom" delete="true" create="false" decoration-danger="(recip_bankgiro_acct == False) or (memo == '') or (bool_red == True)"&gt;
                              &lt;field name="id" invisible="1"/&gt;
                              &lt;field name="partner_id"/&gt;
                              &lt;field name="recip_bankgiro_acct"/&gt;
                              &lt;field name="number"/&gt;
                              &lt;field name="ocr_number"/&gt;
                              &lt;field name="memo"/&gt;
                              &lt;field name="date_due" invisible="1"/&gt;
                              &lt;field name="pay_date"/&gt;
                              &lt;field name="origin"/&gt;
                              &lt;field name="residual" string="Payment Amount" sum="Total"/&gt;
                              &lt;field name="state"/&gt;
                              &lt;field name="currency_id"/&gt;
                              &lt;field name="bool_red" invisible="1"/&gt;
                          &lt;/tree&gt;
                      &lt;/field&gt;
                      &lt;footer&gt;
                          &lt;button name="btn_generate_bankgiro" string="Generate BankGiro Payment File"
                              type="object" class="btn btn-primary"/&gt;
                          &lt;button string="Cancel" class="btn-default" special="cancel"/&gt;
                      &lt;/footer&gt;
                  &lt;/form&gt;
              &lt;/field&gt;
          &lt;/record&gt;
  
           &lt;record id="inv_tree" model="ir.ui.view"&gt;
              &lt;field name="name"&gt;account.invoice.pay.tree&lt;/field&gt;
              &lt;field name="model"&gt;account.invoice&lt;/field&gt;
              &lt;field name="arch" type="xml"&gt;
                  &lt;tree&gt;
                      &lt;field name="id" invisible="1"/&gt;
                      &lt;field name="partner_id"/&gt;
                      &lt;field name="recip_bankgiro_acct"/&gt;
                      &lt;field name="number"/&gt;
                      &lt;field name="ocr_number"/&gt;
                      &lt;field name="memo"/&gt;
                      &lt;field name="date_due" invisible="1"/&gt;
                      &lt;field name="pay_date"/&gt;
                      &lt;field name="origin"/&gt;
                      &lt;field name="pay_amt" string="Payment Amount" sum="Total"/&gt;
                      &lt;field name="state"/&gt;
                      &lt;field name="currency_id"/&gt;
                      &lt;field name="bool_red" invisible="1"/&gt;
                  &lt;/tree&gt;
              &lt;/field&gt;
          &lt;/record&gt;
  
          &lt;record id="view_account_bankgiro_payment_tree" model="ir.ui.view"&gt;
              &lt;field name="name"&gt;account.payment.bankgiro.tree&lt;/field&gt;
              &lt;field name="model"&gt;account.payment.bankgiro&lt;/field&gt;
              &lt;field name="arch" type="xml"&gt;
                  &lt;tree create="false"&gt;
                      &lt;field name="name"/&gt;
                      &lt;field name="currency_id" invisible="1"/&gt;
                      &lt;field name="date"/&gt;
                      &lt;field name="total_amount" options="{'currency_field': 'currency_id'}"/&gt;
                  &lt;/tree&gt;
              &lt;/field&gt;
          &lt;/record&gt;
  
          &lt;record id="view_account_bankgiro_payment_form" model="ir.ui.view"&gt;
              &lt;field name="name"&gt;account.payment.bankgiro.form&lt;/field&gt;
              &lt;field name="model"&gt;account.payment.bankgiro&lt;/field&gt;
              &lt;field name="arch" type="xml"&gt;
                  &lt;form create="false" edit="false"&gt;
                      &lt;sheet&gt;
                          &lt;div class="oe_button_box" name="button_box"&gt;
                              &lt;button class="oe_stat_button" name="button_invoices"
                                      string="Invoices" type="object"
                                      icon="fa-bars"/&gt;
                              &lt;button class="oe_stat_button" name="button_payments"
                                      string="Payments" type="object"
                                      icon="fa-bars"/&gt;
                          &lt;/div&gt;
                          &lt;div class="oe_title"&gt;
                              &lt;h1&gt;&lt;field name="name"/&gt;&lt;/h1&gt;
                          &lt;/div&gt;
                          &lt;group&gt;
                              &lt;group&gt;
                                  &lt;field name="filename" invisible="1"/&gt;
                                  &lt;field name="file" filename="filename" readonly="True"/&gt;
  
                              &lt;/group&gt;
                              &lt;group&gt;
                                  &lt;field name="currency_id" invisible="1"/&gt;
                                  &lt;field name="date" readonly="True"/&gt;
                                  &lt;field name="total_amount" options="{'currency_field': 'currency_id'}" readonly="True"/&gt;
                              &lt;/group&gt;
                          &lt;/group&gt;
                      &lt;/sheet&gt;
                  &lt;/form&gt;
              &lt;/field&gt;
          &lt;/record&gt;
  
  
  
  
  
  
  
  
      &lt;record id="account_payment_method_bankgiro_transfer" model="account.payment.method"&gt;
          &lt;field name="name"&gt;BankGiro Transfer&lt;/field&gt;
          &lt;field name="code"&gt;bankgiro_tr&lt;/field&gt;
          &lt;field name="payment_type"&gt;outbound&lt;/field&gt;
      &lt;/record&gt;
  
      &lt;record id="view_account_payment_from_invoices_inherit_account_bankgiro" model="ir.ui.view"&gt;
          &lt;field name="name"&gt;account.register.payments.wizard.from.invoices.inherited&lt;/field&gt;
          &lt;field name="model"&gt;account.register.payments&lt;/field&gt;
          &lt;field name="inherit_id" ref="account.view_account_payment_from_invoices"/&gt;
          &lt;field name="arch" type="xml"&gt;
              &lt;xpath expr="//field[@name='payment_date']" position="attributes"&gt;
                  &lt;attribute name="attrs"&gt;{'invisible':[('payment_method_code','=','bankgiro_tr')]}&lt;/attribute&gt;
              &lt;/xpath&gt;
              &lt;xpath expr="//field[@name='communication']" position="attributes"&gt;
                  &lt;attribute name="attrs"&gt;{'invisible':[('payment_method_code','=','bankgiro_tr')]}&lt;/attribute&gt;
              &lt;/xpath&gt;
              &lt;xpath expr="//field[@name='amount']" position="attributes"&gt;
                  &lt;attribute name="attrs"&gt;{'invisible':[('payment_method_code','=','bankgiro_tr')]}&lt;/attribute&gt;
              &lt;/xpath&gt;
             &lt;xpath expr="//form/footer/button[@name='create_payment']" position="attributes" name="" &gt;
                  &lt;attribute name="attrs"&gt;{'invisible':[('payment_method_code','=','bankgiro_tr')]}&lt;/attribute&gt;
              &lt;/xpath&gt;
              &lt;xpath expr="//form/footer/button[@special='cancel']" position="before"&gt;
                  &lt;button string='Validate' name="create_bankgiro_payment" type="object" class="btn-primary" attrs="{'invisible': [('payment_method_code','!=','bankgiro_tr')]}"/&gt;
              &lt;/xpath&gt;
          &lt;/field&gt;
      &lt;/record&gt;
  </code></pre>