İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
6696 Görünümler

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?

Avatar
Vazgeç
Üretici En İyi Yanıt

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.

Avatar
Vazgeç

@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
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Ağu 25
670
1
Nis 25
1627
1
Eyl 24
2334
1
Tem 24
2082
1
May 24
4565