From 7c19f7821014347210d95879a75b43f0716249d9 Mon Sep 17 00:00:00 2001 From: "Jay Vora (OpenERP)" Date: Thu, 7 Jul 2011 11:15:40 +0530 Subject: [PATCH] [FIX] Account_budget : Correction in the calculation of theoritical amount bzr revid: jvo@tinyerp.com-20110707054540-gc7c81y8ptudxqi5 --- addons/account_budget/account_budget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_budget/account_budget.py b/addons/account_budget/account_budget.py index 12caba17374..1746a447cf1 100644 --- a/addons/account_budget/account_budget.py +++ b/addons/account_budget/account_budget.py @@ -161,7 +161,7 @@ class crossovered_budget_lines(osv.osv): total = strToDate(line.date_to) - strToDate(line.date_from) elapsed = min(strToDate(line.date_to),strToDate(date_to)) - max(strToDate(line.date_from),strToDate(date_from)) if strToDate(date_to) < strToDate(line.date_from): - elapsed = strToDate(date_to) - strToDate(date_to) + elapsed = strToDate(line.date_from) - strToDate(date_to) if total.days: theo_amt = float(elapsed.days / float(total.days)) * line.planned_amount