price format in report

Asked by khemiri Rawia

Hi, I have a big poblem, I have to modify the price format to have more than 2 digits, I need to have 5 digits. I change it in data base and in openerp and it seems to work wonderful but i have a problem with reports when i want to print and order it doesn't work with 5 digits only with 2 Sad
please I need to solve this problem soon!
thanks for your help

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Jay Vora (Serpent Consulting Services)
Solved:
Last query:
Last reply:

This question was originally filed as bug #595405.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#1

Hi Khemiri Rawia,

You will need to edit the RML of the report and supply the no. of digits you want in formatting.

The formatLang() is responsible for the same. Edit as formatLang(price,digits=5).

Hope this helps.

Thanks.

Revision history for this message
khemiri Rawia (khemiri-rawia) said :
#2

thanks for your help :)
but I don't know where and which file i have to modify! I didnt find the file which contain "formatLang" !!
thanks for your help but i need to know which file i have to modify
Have a good day

Revision history for this message
Best Jay Vora (Serpent Consulting Services) (jayvora) said :
#3

Hi,

You will a file sale/report/order.rml under your addons.

Go through file, whichever fields you want to have 5 precisions, modify it like formatLang(line.price_unit ,digits=5) from formatLang(line.price_unit ).

Hope this helps.

Thanks.

Revision history for this message
khemiri Rawia (khemiri-rawia) said :
#4

OK I'll try it and you'll tell you :)
thanks a lot for your help I appreciate it :)

Revision history for this message
khemiri Rawia (khemiri-rawia) said :
#5

Yeeeeeeeees it works :)
thanks a lot :)

Revision history for this message
khemiri Rawia (khemiri-rawia) said :
#6

Thanks Jay (Open ERP), that solved my question.

Revision history for this message
Joel Cabral (hephaestus) said :
#7

Hi,

How can I add separator or comma (,) in report? For example in account balance report, it shows the cost in this format 12878649.98 and to think this is an accounting report. is there a way to change it to 12,878,649.98?

Thanks,

Revision history for this message
Samuel Mukoti (e9-spq-j8) said :
#8

Joel,

Did you ever find a solution to the above question?