From 2bfc9b95fa982c6ec0d7a21425feaf46cd7192e9 Mon Sep 17 00:00:00 2001 From: "ame (Tiny/Axelor)" Date: Thu, 2 Jul 2009 13:11:25 +0530 Subject: [PATCH] [FIX] price unit calculation from context (web client issue). bzr revid: ame@tinyerp.com-20090702074125-f0kmzz2r5gzkvgfc --- addons/account/invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 37a73adfea4..6ec083ac7cb 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -921,7 +921,7 @@ class account_invoice_line(osv.osv): if 'check_total' in context: t = context['check_total'] for l in context.get('invoice_line', {}): - if len(l) >= 3 and l[2]: + if isinstance(l, (list, tuple)) and len(l) >= 3 and l[2]: tax_obj = self.pool.get('account.tax') p = l[2].get('price_unit', 0) * (1-l[2].get('discount', 0)/100.0) t = t - (p * l[2].get('quantity'))