跳至內容
選單
此問題已被標幟
5 回覆
4284 瀏覽次數

Okay, This is very strange. I can't revert back to 2 decimals of my default currency. 


Recently I have changed the decimal of default currency from 2 to 3 (shown in pic). But now I am trying to revert back it says.  " You won't be able to reduce the number of decimal places of a currency which has already been used to make accounting entries."


I have tried within my Technical Settings>Data Structure>Decimal Accuracy (shown in pic)


These all options are default ones, So I tried creating a new one but it doesn't work.


Isn't there any simple way to revert back to 2 decimals?


Note: I am using Enterprise version 14 with Studio installed.

頭像
捨棄
最佳答案

Hi, 

This will happened when you increased the decimal place in the currency. It is ok when you decrease it. 

You need to update the "Rounding Factor" Field of the currency by database side using query. Decimal will be changed based on that. 

Hope it will help you. 



頭像
捨棄
最佳答案

Hi all,


Please let us know how you solve or force the system to reduce decimal accuracy in currency to 2??

頭像
捨棄
最佳答案

Hi everyone,

  1. The simpliest for people on Odoo Saas without an access to the db : just add and field amount there:
    1. Got Settings -> Technical -> Database Structure -> Decimal Accuracy
    2. Then add "Amount" as field with 2-digit options : all the amounts in the db will be show with 2 digits and you keep the rounding accuracy with more than 2-digits. It is what the users want usually.
  2. You have to request on command line with SQL (not recommanded on production db !!! ). Check on local or in a staging branch if no constraints are broken. 

Just go into the shell and enter the postgres prompt with 

psql

Select the currency you want to revert back to 2-digitsmode with :

select * from res_currency where id={ID DEVISE}; //to check we are 											​ //working on the right 										​   //currency
UPDATE res_currency SET rounding = 0.01 WHERE id = {ID DEVISE};


Hope it helps !

Thomas

頭像
捨棄
最佳答案

Hi,

I have the same issue with Oddo16 cloud. 

Malay, Could I kindly ask you to write the appropriate query to get it back to 2 decimals?

Thanks in advance.

頭像
捨棄

UPDATE res_currency SET rounding = 0.01 WHERE id = id_of_currency;

最佳答案

i have the same issue with Odoo16.
Is there any way to get it back to 2 decimals?

頭像
捨棄