Errorneous value in payment term causes misleading error message when invoicing

Bug #356868 reported by Radu - Eosif Mihăilescu
10
This bug affects 2 people
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

Changed in openobject-addons:
assignee: nobody → Jay (Open ERP) (jvo-openerp)
status: New → Confirmed
status: Confirmed → In Progress
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

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.

Revision history for this message
Radu - Eosif Mihăilescu (csdexter) wrote :

Thank you for your reply,

The new proposed message seems okay -- it directs the user to the most likely place the error occurred at, giving him a real chance of fixing it right away.

@Dexter

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello,

A better way could be to restrict payment term entries.

Fixed in trunk(2306).
Thanks.

Changed in openobject-addons:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.