Odoo Help

0

Change Decimal Precision on Currency Rate

By
Elie H. Nassif
on 7/29/13, 8:38 AM 5,110 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.

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: 7/29/13, 8:38 AM
Seen: 5110 times
Last updated: 7/1/17, 12:44 AM