title: Creating stock.picking from another model - Odoo v8
body: <p>I have this method:</p>
  
  <pre><code>@api.multi
  def create_printy(self):
      copy_record = self.env['stock.picking'] # now you call the method directly
      for record in self:
  
          order_lines = []
          for rec in record.order_lines:
              order_lines.append(
              (0,0,
              {
                  'product_id': rec.isbn.id,
                  'product_qty': rec.qty,
                  }
              ))
          copy_record.create({
              'origin': order.name,
              'picking_type_id.id': 'outgoing',
              'move_lines': order_lines, 
              'move_type': 'direct',
              'priority': '1',
              'company_id': record.company_id.id,
          })
  </code></pre>
  
  <p>This is a button which should create a new <code>stock.picking</code> from my model.</p>
  
  <p>I've tried with <code>picking_type_id.id</code> but it seems to not work, on every example in the standard addons, You just see <code>picking_type_id</code>, also, I don't have any defined in my model, but I though I could pass one of the types available, which is <code>outgoing</code> (the one I need).</p>
  
  <p>Right now, it throws me this:</p>
  
  <pre><code>Integrity Error
  
  The operation cannot be completed, probably due to the following:
  - deletion: you may be trying to delete a record while other records still reference it
  - creation/update: a mandatory field is not correctly set
  
  [object with reference: picking_type_id - picking.type.id]
  </code></pre>
  
  <p>So, how can I pass this <code>picking_type_id</code> into the <code>stock.picking</code>, should I define this field in my model, even if not required? But it is required by <code>stock.picking</code> model though.</p>