Currently, you can set to return value of an OpenERP to the following, to get the current form to be closed:
return {\'type\':\'ir.actions.act_window_close\
There is a function that gives you the act_window for a given xml_id.
def open_popup(self, cr, uid, ids, context=None): if move.parent_production_id: win_obj = self.pool.get('ir.actions.act_window') res = win_obj.for_xml_id(cr, uid, 'module_name', 'id_specified_for_the_view', context) return res