rounding (float representation) error in residual amount
Bug #424214 reported by
szczytt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
gpa(OpenERP) |
Bug Description
Server version 5.0.3
1. Enter invoice with total amount of 123,36. Accept.
2. Make partial payment of 52,57
3. Make remaining payment of 70,79.
Invoice does not change state to Done (Paid).
Residual shows -0,00 (on database it is -1.42108547152e
Looks like float representation error. Round is missing somewhere.
Related branches
Changed in openobject-addons: | |
status: | New → Confirmed |
assignee: | nobody → gpa(tiny) (gpa-openerp) |
To post a comment you must log in.
Workaround/patch:
invoice.py
line 111 (_amount_residual):
from: res[inv.id] = to_pay - abs(paid_amt)
to: res[inv.id] = round(to_pay - abs(paid_amt),10)
line 895 (pay_and_ reconcile) :
from: if (not total) or writeoff_acc_id:
to: if (not round(total,10)) or writeoff_acc_id: