odoo context field. default value for popup
<p>I work with Odoo(v9). I have custom: form(for model 1), action and popup with form(for model 2).
Here example main form:</p>

<pre><code>&lt;record id="my_id_form" model="ir.ui.view"&gt;
    &lt;field name="name"&gt;my_name_form&lt;/field&gt;
    &lt;field name="model"&gt;my_model_one&lt;/field&gt;
    &lt;field name="arch" type="xml"&gt;
        &lt;form string="Name"&gt;
            &lt;sheet&gt;
                &lt;group&gt;
                    &lt;field name="partner_id"/&gt;
                    &lt;!-- button which open popup with my_model_two --&gt;
                    &lt;button string="Open popup"
                            name="%(my_module.action_open_popup)d"
                            type="action"
                            class="btn-link"/&gt;
                &lt;/group&gt;
            &lt;/sheet&gt;
        &lt;/form&gt;
    &lt;/field&gt;
&lt;/record&gt;
</code></pre>

<p>Window action for button <em>Open popup</em>:</p>

<pre><code>&lt;record id="action_open_popup" model="ir.actions.act_window"&gt;
    &lt;field name="name"&gt;action name&lt;/field&gt;
    &lt;field name="res_model"&gt;my_model_two&lt;/field&gt;
    &lt;field name="view_id" ref="model_two_form_popup"/&gt;
    &lt;!-- 
    How I can send partner_id from main form to popup? 
    I tried different ways in context field, but all in vain  
    &lt;field name="context"&gt;{'default_partner_id': ?????,}&lt;/field&gt;
    --&gt;
    &lt;field name="target"&gt;new&lt;/field&gt;
&lt;/record&gt;
</code></pre>

<p>Example <em>my_model_one</em></p>

<pre><code>class MyModelOne(models.Model):
    _name = 'my_model_one'

    partner_id = fields.Many2one('res.partner', string='Partner')
</code></pre>

<p>Popup form:</p>

<pre><code>&lt;record id="model_two_form_popup" model="ir.ui.view"&gt;
    &lt;field name="name"&gt;Popup name&lt;/field&gt;
    &lt;field name="model"&gt;my_model_two&lt;/field&gt;
    &lt;field name="arch" type="xml"&gt;
        &lt;form string="Popup text"&gt;
            &lt;sheet&gt;
                &lt;group&gt;
                    &lt;field name="partner_id" invisible="1"/&gt;
                &lt;group&gt;
            &lt;/sheet&gt;
        &lt;/form&gt;
    &lt;/field&gt;
&lt;/record&gt;
</code></pre>

<p>My question is: How I can send value <em>from field in main form</em> to <em>popup form</em>?(partner_id)</p>

<p>I saw how in the code used <em>active_id</em>, string or integer values. But I have not found how to send fields values or how to register method for custom logic.
Can someone provide a small example? Thanks in advance.</p>