From 39d0932dfab7f6735f4b43fd1d1f1d5fbafb3e90 Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Thu, 14 Apr 2011 15:05:40 +0530 Subject: [PATCH] [FIX]: purchase: Fixed invoiced rate for purchase order bzr revid: rpa@tinyerp.com-20110414093540-lv5x998zs3cv770b --- addons/purchase/purchase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 6f6ab0c1b44..324fe130f81 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -98,7 +98,7 @@ class purchase_order(osv.osv): tot = 0.0 for invoice in purchase.invoice_ids: if invoice.state not in ('draft','cancel'): - tot += invoice.amount_untaxed + tot += (invoice.amount_untaxed - invoice.residual) if purchase.amount_untaxed: res[purchase.id] = tot * 100.0 / purchase.amount_untaxed else: