title: How can i show field of model “sale.order” in form view of “account.invoice” in odoo12
body: <p>i have added a customize field "commission" to my purchase order model. When clicking "create Bill" of "purchase.order.form" view i want to show the "commission" field in "account.invoice.supplier.form" view. I have heritated the action_view_invoice function from purchase module</p>
  
  <p>my field.py</p>
  
  <pre><code># -*- coding: utf-8 -*-
  from odoo import api, models,fields
  import logging
  
  _logger = logging.getLogger(__name__)
  
  class ConfirmComm(models.Model):
    _inherit = "account.invoice"
    commission = fields.Float(string='Commission', required='true', default=0)
  
  @api.multi
  def action_view_invoice(self,order):
          '''
          This function returns an action that display existing vendor bills of given purchase order ids.
          When only one found, show the vendor bill immediately.
          '''
          action = self.env.ref('account.action_vendor_bill_template')
          result = action.read()[0]
          create_bill = self.env.context.get('create_bill', False)
          # override the context to get rid of the default filtering
          result['context'] = {
              'type': 'in_invoice',
              'default_purchase_id': self.id,
              'default_currency_id': self.currency_id.id,
              'default_company_id': self.company_id.id,
              'company_id': self.company_id.id
              'commission': order.commission,
          }
          _logger.info("KTR this is save invoice$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ %d", self.commission)
          # choose the view_mode accordingly
          if len(self.invoice_ids) &gt; 1 and not create_bill:
              result['domain'] = "[('id', 'in', " + str(self.invoice_ids.ids) + ")]"
          else:
              res = self.env.ref('account.invoice_supplier_form', False)
              result['views'] = [(res and res.id or False, 'form')]
              # Do not set an invoice_id if we want to create a new bill.
              if not create_bill:
                  result['res_id'] = self.invoice_ids.id or False
          result['context']['default_origin'] = self.name
          result['context']['default_reference'] = self.partner_ref
          return result
  </code></pre>
  
  <p>my field.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;odoo&gt;
   &lt;data&gt;
      &lt;record id="view_invoice_form_inherit" model="ir.ui.view"&gt;
          &lt;field name="name"&gt;account.invoice.supplier.form&lt;/field&gt;
          &lt;field name="model"&gt;account.invoice&lt;/field&gt;
          &lt;field name="inherit_id" ref="account.invoice_supplier_form"/&gt;
          &lt;field name="arch" type="xml"&gt;
                  &lt;xpath expr="//field[@name='user_id']" position="after"&gt;
                      &lt;field name="commission"/&gt;
              &lt;/xpath&gt;
          &lt;/field&gt;
      &lt;/record&gt;
   &lt;/data&gt;
  &lt;/odoo&gt;
  </code></pre>