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

Change Decimal Precision on Currency Rate

By
Elie H. Nassif
on 7/29/13, 8:38 AM 3,467 views

Hi,

i need to modify the decimal precision of my currency rate field on the currency window from 6 to 9. for example the maximum digits allowed in the system is 6 : :3.673100". but i need to change to 9 : "3.673100xxx" I know i can change decimal precision under settings /technical/Database structure/Decimal Accuracy. I have already changed it for discount field, but did not succeed for the currency field. i would appreciate any suggestions on that matter either through setup or customization.

Thank you.

0
Amit Parik (amp)
On 7/29/13, 9:00 AM

Hello,

We didn't use the decimal precision for currency rate, You can see the code on res_currency.py

'rate': fields.float('Rate', digits=(12,6), help='The rate of the currency to the currency of rate 1').

If you want to set the decimal precision for currency rate you can customize it by yourself also.

Inherit currency rate object and override the same field as follow. import openerp.addons.decimal_precision as dp

'rate': fields.float('Rate', digits_compute=dp.get_precision('Account'), 'The rate of the currency to the currency of rate 1),

Thank you.

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

0 follower(s)

Stats

Asked: 7/29/13, 8:38 AM
Seen: 3467 times
Last updated: 3/16/15, 8:10 AM