From 87d7a053c81f2f728bc24622817b2bf16eadecf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 1 Jul 2008 12:21:37 +0200 Subject: [PATCH] Fix call get on browse record for issue160 --- purchase.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/purchase.py b/purchase.py index eeab7882d2..4defd88214 100644 --- a/purchase.py +++ b/purchase.py @@ -565,9 +565,10 @@ class PurchaseLine(OSV): res['taxes'] = [] for tax in product.supplier_taxes: if party: - if party.get('supplier_' + tax.group.code): + if 'supplier_' + tax.group.code in party_obj._columns \ + and party['supplier_' + tax.group.code]: res['taxes'].append( - party.get('supplier_' + tax.group.code).id) + party['supplier_' + tax.group.code].id) continue res['taxes'].append(tax.id)