title: Odoo - field from sales order to purchase order
body: <p>I am using Odoo 10. I have a custom field call linear_units in Sales Order. I  have <strong>make to order</strong> ticked and it creates an automatic Purchase order. I would like to include the field linear_units from Sales order to the purchase order. With below code I can select the Sales order but I cant figure out how to add a field.</p>
  
  <pre><code>class PurchaseOrder(models.Model):
      _inherit = 'purchase.order'
  
      sale_order_id = fields.Many2one(
          'sale.order',
          "Sale Order",
          help="Reference to Sale Order")
  </code></pre>
  
  <p>The above code works for selecting a sales order in purchase order. I have a float field in Sales order called linear_units. I need this field to copy to purchase order. I tried below but does not work</p>
  
  <pre><code>class PurchaseOrder(models.Model):
      _inherit = 'purchase.order'
  
  
      linear_units2 = fields.Float("Linear Units")
  
      @api.onchange('product_id','linear_units')
      def _onchange_product_qty(self):
          if self.product_id:
              self.linear_units2 = self.sale.order.linear_units
  </code></pre>