bzr revid: hda@tinyerp.com-20080829094406-ghw2lj7fclwjvktv
This commit is contained in:
hda@tinyerp.com
2008-08-29 15:14:06 +05:30
parent ae21cdb0ee
commit 29291c35ea
+1 -2
View File
@@ -90,8 +90,7 @@ class purchase_order(osv.osv):
res = {}
for purchase in self.browse(cursor, user, ids, context=context):
tot = 0.0
if purchase.invoice_id.state not in ('draft','cancel'):
if purchase.invoice_id and purchase.invoice_id.state not in ('draft','cancel'):
tot += purchase.invoice_id.amount_untaxed
if tot:
res[purchase.id] = tot * 100.0 / purchase.amount_untaxed