(self, cr, uid, ids, invoice_ids, context=None)
return {
            'name': _('Advance Invoice'),
            'view_type': 'form',
            'view_mode': 'form,tree',
            'res_model': 'account.invoice',
            'res_id': invoice_ids[0],
            'view_id': False,
            'views': [(form_id, 'form'), (tree_id, 'tree')],
            'context': "{'type': 'out_invoice'}",
            'type': 'ir.actions.act_window',
        }
open a view on one of the given invoice_ids
open a view on one of the given invoice_ids
open a view on one of the given invoice_ids
def open_invoices(self, cr, uid, ids, invoice_ids, context=None):
        """ open a view on one of the given invoice_ids """
        ir_model_data = self.pool.get('ir.model.data')
        form_res = ir_model_data.get_object_reference(cr, uid, 'account', 'invoice_form')
        form_id = form_res and form_res[1] or False
        tree_res = ir_model_data.get_object_reference(cr, uid, 'account', 'invoice_tree')
        tree_id = tree_res and tree_res[1] or False

        return {
            'name': _('Advance Invoice'),
            'view_type': 'form',
            'view_mode': 'form,tree',
            'res_model': 'account.invoice',
            'res_id': invoice_ids[0],
            'view_id': False,
            'views': [(form_id, 'form'), (tree_id, 'tree')],
            'context': "{'type': 'out_invoice'}",
            'type': 'ir.actions.act_window',
        }
def open_invoices ( self , cr , uid , ids , invoice_ids , context = None ) : ir_model_data = self . pool . get ( 'ir.model.data' ) form_res = ir_model_data . get_object_reference ( cr , uid , 'account' , 'invoice_form' ) form_id = form_res and form_res [ 1 ] or False tree_res = ir_model_data . get_object_reference ( cr , uid , 'account' , 'invoice_tree' ) tree_id = tree_res and tree_res [ 1 ] or False return { 'name' : _ ( 'Advance Invoice' ) , 'view_type' : 'form' , 'view_mode' : 'form,tree' , 'res_model' : 'account.invoice' , 'res_id' : invoice_ids [ 0 ] , 'view_id' : False , 'views' : [ ( form_id , 'form' ) , ( tree_id , 'tree' ) ] , 'context' : "{'type': 'out_invoice'}" , 'type' : 'ir.actions.act_window' , }