Merge lp:~camptocamp/openobject-addons/6.0-fix-1084424 into lp:openobject-addons/6.0

Proposed by Alexandre Fayolle - camptocamp
Status: Needs review
Proposed branch: lp:~camptocamp/openobject-addons/6.0-fix-1084424
Merge into: lp:openobject-addons/6.0
Diff against target: 16 lines (+2/-2)
1 file modified
l10n_fr/report/base_report.py (+2/-2)
To merge this branch: bzr merge lp:~camptocamp/openobject-addons/6.0-fix-1084424
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+136861@code.launchpad.net

Description of the change

use abs(v) < epsilon instead of v < epsilon in l10n_fr reports

To post a comment you must log in.

Unmerged revisions

5380. By Alexandre Fayolle @ camptocamp <email address hidden> on 2012-11-29

[FIX] l10n_fr: use abs(v)<epsilon when checking for small value

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_fr/report/base_report.py'
2--- l10n_fr/report/base_report.py 2011-01-14 00:11:01 +0000
3+++ l10n_fr/report/base_report.py 2012-11-29 08:22:22 +0000
4@@ -106,10 +106,10 @@
5 value=line["debit"]-line["credit"]
6 elif(type == "D"):
7 value=line["debit"]-line["credit"]
8- if(value<0.001): value=0.0
9+ if(abs(value)<0.001): value=0.0
10 elif(type == "C"):
11 value=line["credit"]-line["debit"]
12- if(value<0.001): value=0.0
13+ if(abs(value)<0.001): value=0.0
14 if(operator == '+'):
15 sum += value
16 else: