GTK Client closes when opening external URL

Bug #919980 reported by jordg
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Confirmed
Low
OpenERP sa GTK client R&D

Bug Description

In my attempts to open a URL I have come across this issue.
Using the google_maps module for example.
On the web client it opens a new tab and displays the map.
On the GTK client pressing the button closes the client and opens the web page.

                if url:
                    return { 'type': 'ir.actions.act_url', 'url':url, 'target': 'new' }

This is on V6.1rc1

Alternatively if I use the wizard method the GTK client works OK but the web client does nothing.
See http://www.openerp.com/forum/topic29798.html

affects: openobject-client-web → openobject-client
Changed in openobject-client:
assignee: nobody → OpenERP sa GTK client R&D (openerp-dev-gtk)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
jordg (gbj) wrote :

This is a bit more serious than Low

Version 6.1
This also happens with Google maps interface.
On the GTK Client interface under Sales->Address Book->Customers
Click on Customer, then click on Map button
URL opens in Web browser -> GTK Closes

In another case, I create a button in a list
<button name="button_open_mo" type="object" string="Open" icon="gtk-open" help="Open this MO"/>

def button_open_mo(self, cr, uid, ids, context):
        production_id = self.browse(cr, uid, ids)[0].production_id.id
        logger.info("%s.button_open_mo(): ids = %s : production_id = %s : context = %s", self._name, ids, production_id, context)
        mod_obj = self.pool.get('ir.model.data')
        form_res = mod_obj.get_object_reference(cr, uid, 'mrp', 'mrp_production_form_view')
        form_id = form_res and form_res[1] or False
        return {
            'type': 'ir.actions.act_window',
            'name': _('Manufacturing Order'),
            'view_type': 'form',
            'view_mode': 'form',
            'res_model': 'mrp.production',
            'domain': str([('id', 'in', production_id)]),
            'views': [(form_id, 'form')],
            'view_id': 'mrp_production_form_view',
            'target': 'self',
            'res_id': production_id,
        }

Again pressing button on list results in GTK Client closing immediately.

Revision history for this message
jordg (gbj) wrote :

Aha

There is no problem (Well maybe with the [What Documentation?])
To stop the GTK Client closing we add 'nodestroy': True, to the above dictionary.
Overjoyed.
Please close this bug

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.