diff options
| author | ame (Tiny/Axelor) <ame@tinyerp.com> | 2009-07-02 13:11:25 +0530 |
|---|---|---|
| committer | ame (Tiny/Axelor) <ame@tinyerp.com> | 2009-07-02 13:11:25 +0530 |
| commit | 2bfc9b95fa982c6ec0d7a21425feaf46cd7192e9 (patch) | |
| tree | 08e43bc3678debb32426d5fa8d70946bfcff811e | |
| parent | 800140ddea9211a24c69e7df04da9e12887049f8 (diff) | |
[FIX] price unit calculation from context (web client issue).
bzr revid: ame@tinyerp.com-20090702074125-f0kmzz2r5gzkvgfc
| -rw-r--r-- | addons/account/invoice.py | 2 |
1 files changed, 1 insertions, 1 deletions
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')) |
