Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
6698 Widoki

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?

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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.

Awatar
Odrzuć

@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)

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
Powiązane posty Odpowiedzi Widoki Czynność
1
sie 25
670
1
kwi 25
1627
1
wrz 24
2335
1
lip 24
2082
1
maj 24
4567