From 12e5a78d6ecc369a181e7950fca2991a36db8d07 Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Sat, 16 Oct 2010 03:17:18 +0530 Subject: [PATCH] [FIX] Account_voucher : minor fix bzr revid: jvo@tinyerp.com-20101015214718-9oetl1dh9y5qjjo7 --- addons/account_voucher/account_voucher.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 6883a53b13f..c048763ac5d 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -257,10 +257,9 @@ class account_voucher(osv.osv): total = 0.0 total_tax = 0.0 - for line in line_ids: line_amount = 0.0 - line_amount = line[2].get('amount') + line_amount = line[2] and line[2].get('amount',0.0) or 0.0 voucher_line_ids += [line[1]] voucher_total += line_amount