Note that there are some explanatory texts on larger screens.

plurals
  1. POOpenerp act_window popsup a new window, but the main client disappear
    text
    copied!<p>I'm building a openerp customer module that in tree view, there is a button for each entry, when pressed, an act_window action will be triggered and open a new pops-up window, but at the same time, the main gtk client disappeared (only the pops-up remains). Also I have set the 'target' to 'new', but still the same. Any ideas?</p> <p>client: gtk-6.0.3 on windows</p> <p>server: 6.0.2 on debian 2.6.32</p> <p>the xml looks like:</p> <pre><code>&lt;field name="type"&gt;tree&lt;/field&gt; &lt;field name="arch" type="xml"&gt; &lt;tree string="Field Schema"&gt; &lt;field name="field_name" /&gt; &lt;field name="field_type" /&gt; &lt;button name="edit" type="object" string="View and Edit" icon="gtk-go-forward" /&gt; &lt;/tree&gt; &lt;/field&gt; </code></pre> <p>and the edit function to trigger looks like:</p> <pre><code>def edit(self, cr, uid, ids, context=None): obj_name = some_fn_dynamic_get_obj_name_from_ids(ids) obj = self.pool.get(obj_name) if not obj: raise osv.except_osv('not supported') res_id = obj.create(....) ... return { 'type': 'ir.actions.act_window', 'name': 'View and Edit', 'view_mode': 'form', 'view_type': 'form', 'res_model': obj_name, 'res_id': res_id, 'target': 'new', 'context': context, } </code></pre> <p>Updated: after debug into the client's source, i finally found that: i make a typo: <strong>nodestory</strong> where the correct one should be <strong>nodestroy</strong></p> <pre><code> return { 'type': 'ir.actions.act_window', ... 'context': context, 'nodestroy': True, } </code></pre> <p>T_T</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload