Odoo Help

1

Problem With Decimal Accuracy?

By
charlie
on 8/9/14, 1:08 PM 885 views

I got a problem with the decimal accuracy in a quantity field, when i go to database/structure/decimal_accuracy and set the accuracy to '0' of the product unit of mesaure it doesn't work on the report, the module show me the field with the accuracy to for example 5 and the printed report 5.00. i think it's strange cause when a i set accuracy to 3 or x number of decimals the report show me the value 5.000 but it doesn't work with 0. Any ideas?

1
charlie
On 8/28/14, 2:30 PM

i get a solution  add this python validation to the rml file in the qty field. it will be something like this: [[ ' % .f ' % product_qty]] this set the float as an integer, then will be show in the pdf file. the database/structure/decimal_accuracy  only affects the field decimal accuracy showed in the UI.

Hope this will be useful to other of you. Regards.

@Charlie,

Thanks for sharing that, it really helped me out with Aeroo reports and decimal accuracy on QTY fields.

I have another issue, Aeroo is only printing one decimal place (eg. 0.5) when the database is setup to two decimal places (eg. 0.50), and I need to print the correct decimal accuracy on my reports which is two decimal places. Do you have any suggestions on how to get correct decimal precision for something like this?:

get_price(product, pricelist)

Luke Branch
on 8/17/15, 12:17 PM
i don't use aeroo reports but try to make a bracket in rml like this e.g. [[ formatLang(o.unit_price, digits=get_digits(dp='Account') ) ]]

2015-08-17 9:17 GMT-07:00 Luke Branch <luke-weairsoft-com@mail.odoo.com>:

@Charlie,

Thanks for sharing that, it really helped me out with Aeroo reports and decimal accuracy on QTY fields.

I have another issue, Aeroo is only printing one decimal place (eg. 0.5) when the database is setup to two decimal places (eg. 0.50), and I need to print the correct decimal accuracy on my reports which is two decimal places. Do you have any suggestions on how to get correct decimal precision for something like this?:

get_price(product, pricelist)

--
Luke Branch
Sent by Odoo S.A. using Odoo about Forum Post False



--
Carlos Fernando Mexia Valenzuela
charlie
on 8/17/15, 2:55 PM

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 8/9/14, 1:08 PM
Seen: 885 times
Last updated: 8/17/15, 12:13 PM