title: Odoo Wizard: How to populate with active fields from parent view
body: <p>I'm stuck to populate a wizard since a week know, and I'm completely lost on the way to do that.</p>
  
  <p>Until know, I've created a custom button on the stock module, view_picking_form record with an inherited model (see views.xml). I also know how to create a custom wizard (wizard.py wizard.xml).</p>
  
  <p>But what I do not know is how to populate it with the list of products fields product_id, product_qty, qty_done that are linked to to the parent view. I'm working with the new API on Odoo 10 and couln't find the method to do that.
  Odoo always tells me it doesn't know the fields I want to pass and nothing display on the wizard.</p>
  
  <p>Can anyone help me on that ?</p>
  
  <p>views.xml</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;odoo&gt;
          &lt;data&gt;
              &lt;record id="view_picking_form_inherit" model="ir.ui.view"&gt;
                  &lt;field name="name"&gt;stock.picking.form.inherit&lt;/field&gt;
                  &lt;field name="model"&gt;stock.picking&lt;/field&gt;
                  &lt;field name="inherit_id" ref="stock.view_picking_form"/&gt;
                  &lt;field name="arch" type="xml"&gt;
  
                      &lt;xpath expr="//form/sheet/h1[@class='hidden-xs']" position="inside"&gt;
                          &lt;div class="oe_right oe_button_box"&gt;
  
                              &lt;button string="Open Wizard" name="%(action_wizard)d"
                                      type="action" class="oe_button oe_form_button oe_highlight"/&gt;
                          &lt;/div&gt;
                      &lt;/xpath&gt;
                  &lt;/field&gt;
              &lt;/record&gt;
          &lt;/data&gt;
      &lt;/odoo&gt;
  </code></pre>
  
  <p>wizard.py</p>
  
  <pre><code># -*- coding: utf-8 -*-
  from odoo import _, api, fields, models
  
  class MyClass(models.TransientModel):
      _name = 'stock.picking.wizard'
      _inherit = ['stock.picking', 'stock.pack.operation']
  
      def _default_products(self):
          active_id = self.env.context.get('active_id')
          if active_id:
              product = self.env['stock.picking'].browse(active_id)
              return product.product_id
          return False
  
      product_id = fields.Many2one('product.product', string='Product', default=_default_products)
  </code></pre>
  
  <p>wizard.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;odoo&gt;
      &lt;data&gt;
          &lt;record id="view_wizard" model="ir.ui.view"&gt;
              &lt;field name="name"&gt;stock_picking_wizard&lt;/field&gt;
              &lt;field name="model"&gt;stock.picking.wizard&lt;/field&gt;
              &lt;field name="arch" type="xml"&gt;
                  &lt;form string="Stock Products"&gt;
                      &lt;field name="picking_id"/&gt;
                      &lt;tree string="Product list"&gt;
                          &lt;field name="product_id"/&gt;
                          &lt;field name="product_qty"/&gt;
                      &lt;/tree&gt;
                  &lt;/form&gt;
              &lt;/field&gt;
          &lt;/record&gt;
  
          &lt;record id="action_wizard" model="ir.actions.act_window"&gt;
              &lt;field name="name"&gt;Wizard&lt;/field&gt;
              &lt;field name="type"&gt;ir.actions.act_window&lt;/field&gt;
              &lt;field name="res_model"&gt;stock.picking.wizard&lt;/field&gt;
              &lt;field name="view_type"&gt;form&lt;/field&gt;
              &lt;field name="view_mode"&gt;form&lt;/field&gt;
              &lt;field name="view_id" ref="view_wizard"/&gt;
              &lt;field name="target"&gt;new&lt;/field&gt;
          &lt;/record&gt;
      &lt;/data&gt;
  &lt;/odoo&gt;
  </code></pre>