[FIX] Fix the rate

lp bug: https://launchpad.net/bugs/322390 fixed

bzr revid: stephane@tinyerp.com-20090128182131-30967pncjn3zcnod
This commit is contained in:
Stephane Wirtel 2009-01-28 19:21:31 +01:00
parent 30a216023c
commit 1e2e50acaf
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ class sale_order(osv.osv):
if invoice.state not in ('draft','cancel'):
tot += invoice.amount_untaxed
if tot:
res[sale.id] = tot * 100.0 / sale.amount_untaxed
res[sale.id] = min(100.0, tot * 100.0 / sale.amount_untaxed)
else:
res[sale.id] = 0.0
return res