Errorneous value in payment term causes misleading error message when invoicing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
Jay Vora (Serpent Consulting Services) |
Bug Description
Versions used {
openobject-addons
latest trunk
}
How to reproduce {
Go to Financial Management -> Configuration -> Payment Terms and create a new payment term. Add a new line to the newly created term setting "Value" to "Percent" and "Value Amount" to anything bigger than "1.00".
Go to Financial Management -> Invoices -> Customer Invoices and create a new customer invoice. Fill the fields and use the aforementioned object for the Payment Term of the invoice.
Click on Validate to accounting-wise create the invoice and an error will be thrown saying that "You can not validate a non-balanced entry !".
}
Root cause analysis {
The error is caused by:
(1) lack of inter-field validation when defining the Payment Term resource combined with lack of appropriate documentation (tooltips) allowing the user to (a) enter an invalid value in the Value Amount field because (b) there is no indication in the interface that percents are to be entered scaled to unity ("1.00" for "100%")
(2) lack of related object validation when opening an invoice (accounting-wise creating it) causing the accounting code to (a) calculate an invalid accounting move and subsequently (b) throw the aforementioned error.
}
How to fix {
Either Payment Term object validation should be implemented or a more appropriate error message (i.e. one that directs the user to the real cause of the problem) be used to report this condition when creating the invoice.
}
Hope this helps,
@Dexter
Related branches
Changed in openobject-addons: | |
assignee: | nobody → Jay (Open ERP) (jvo-openerp) |
status: | New → Confirmed |
status: | Confirmed → In Progress |
Hello,
Here is the corrected notification.
"""
You cannot validate a non-balanced entry !
Possible Cause : The Payment Term (If selected) does not have valid computation(i.e.The value type is not "balance")
"""
Please comment on it.
Thank You.