[IMP] hr_expense : Improved the code.

bzr revid: mdi@tinyerp.com-20120716071150-cj8hu9wxtul9mmbz
This commit is contained in:
Divyesh Makwana (Open ERP) 2012-07-16 12:41:50 +05:30
parent 361291706e
commit 18913e1b4d
1 changed files with 1 additions and 0 deletions

View File

@ -220,6 +220,7 @@ class hr_expense_expense(osv.osv):
'''
This function returns an action that display existing receipt of given expense ids.
'''
assert len(ids) == 1, 'This option should only be used for a single id at a time'
voucher_id = self.browse(cr, uid, ids[0], context=context).voucher_id.id
res = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_voucher', 'view_purchase_receipt_form')
result = {