Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

This is the weirdest issue I have faced: any reason for a float field not being able to store 0 or 0.00 and storing 10.0 in database instead?

By
E.M.
on 2/15/16, 2:19 AM 308 views

From all issues I have faced in Odoo, this is by fair the most weird one.

I have added the following new field to account.invoice:

early_payment_discount_rate = fields.Float(
string = 'Discount Rate (%)',
store = True,
translate = True,
help = "Early payment discount applied to total (before taxes).",
)


It works fine but when I try to set a value of 0 or 0.00, Odoo stores 10 in database. Any other value works fine.

I am extremely lost with this issue, any tip to debug or idea that might lead to fix is really welcomed. Thanks a lot.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/15/16, 2:19 AM
Seen: 308 times
Last updated: 2/15/16, 2:19 AM