~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr

« back to all changes in this revision

Viewing changes to event/wizard/event_make_invoice.py

[MERGE] branch merged with lp:~openerp-dev/openobject-addons/trunk-dev-addons3

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
        for data in self.browse(cr, uid, ids, context=context):
76
76
            res = reg_obj.action_invoice_create(cr, uid, context.get(('active_ids'),[]), data.grouped, date_inv = data.invoice_date)
77
77
 
78
 
        form_id = mod_obj._get_id(cr, uid, 'account', 'invoice_form')
79
 
        form_res = mod_obj.browse(cr, uid, form_id, context=context).res_id
80
 
        tree_id = mod_obj._get_id(cr, uid, 'account', 'invoice_tree')
81
 
        tree_res = mod_obj.browse(cr, uid, tree_id, context=context).res_id
 
78
        form_id = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_form')
 
79
        form_res = form_id and form_id[1] or False
 
80
        tree_id = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_tree')
 
81
        tree_res = tree_id and tree_id[1] or False
82
82
        return {
83
83
            'domain': "[('id', 'in', %s)]" % res,
84
84
            'name': 'Customer Invoices',