← Back to team overview

c2c-oerpscenario team mailing list archive

Re: [Bug 674398] Re: Decimal_precision does not allow to type VAT with 4 digits

 

*** This bug is a duplicate of bug 667316 ***
    https://bugs.launchpad.net/bugs/667316

Hello,

1. If I am correct, the solution you proposed to handle VAT is as
follows: 

account.py (line 1659)
def get_precision_tax():
def change_digit_tax(cr):
res = pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, 1, 'Account')
return (16, res+2)
return change_digit_tax

2. This solution deals with most common European needs, but does not
answer my request, as I explain below.

Cameroon:
- Currency: XAF (CFA Francs), no decimals 
- VAT: 19,25%
- Account: no decimals


If I apply your solution, I will have 'Account'=0 in decimal_precision,
VAT field will be limited to 2 decimals, and will not allow me to
configure correctly without entering some code. 

3. Solution:

As as principle, in all developments, variables used must not be linked
to "functional objects" which have different use: 
eg. taxes and accounts are two different objects, and should not be
linked to one unique variable in decimal_precision 'Account' but should
be clearly separated. 

I come back to my initial proposal (which may not be the best one...): 
Proposal :
Change 'Account' to 'TaxAmount' in account.py in line 1658 :
'amount': fields.float('Amount', required=True,
digits_compute=dp.get_precision('TaxAmount'), help="For taxes of type
percentage, enter % ratio between 0-1."),
Create new variable in decimal accuracy menu : Usage: TaxAmount ;
Digits: 4 (as an example)

I copy the accounting list for comments, thank you.

Best regards

Hervé


________________________________________________________________________

  Hervé PROUST 
  Directeur Associé
Bureau :     +212 (0)522 23 54 44
Mobile Maroc : +212 (0) 670 76 83 67
Mobile France : +33 (0) 6 61 41 50
58 

10, rue Ibnou Al Arif
20 100 Casablanca - Maroc
hproust@xxxxxxxxxxxx 
www.kazacube.com


-------- Message initial --------
De: mra (Open ERP) <mra@xxxxxxxxxxx>
Reply-to: Bug 674398 <674398@xxxxxxxxxxxxxxxxxx>
À: hproust@xxxxxxxxxxxx
Sujet: [Bug 674398] Re: Decimal_precision does not allow to type VAT
with 4 digits
Date: Fri, 12 Nov 2010 12:05:19 -0000


*** This bug is a duplicate of bug 667316 ***
    https://bugs.launchpad.net/bugs/667316

Hello,

We have already fixed this issue for the account.tax digits problem.

thanks,
mra

** This bug has been marked a duplicate of bug 667316
   tax percentage limit 2 digits
 * You can subscribe to bug 667316 by following this link: https://bugs.launchpad.net/openobject-addons/+bug/667316/+subscribe


** Attachment added: "logo_kazacube_mini_225.png"
   https://bugs.launchpad.net/bugs/674398/+attachment/1734102/+files/logo_kazacube_mini_225.png

-- 
Decimal_precision does not allow to type VAT with 4 digits
https://bugs.launchpad.net/bugs/674398
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Addons Modules: Confirmed

Bug description:
Platform: Ubuntu 10.04-OpenERP 6-RC1
1) Digits used for VAT percentage are linked to decimal_precision variable 'Account' in account.py.
For normal configuration, digits = 2. It means that you cannot type 0.1925 if your VAT equals 19,25%.
If you change value of 'Account' to 4, then all your account amounts show 4 digits.
2) Proposal :
Change 'Account' to 'TaxAmount' in account.py in line 1658 :
'amount': fields.float('Amount', required=True, digits_compute=dp.get_precision('TaxAmount'), help="For taxes of type percentage, enter % ratio between 0-1."),
Create new variable in decimal accuracy menu : Usage: TaxAmount ; Digits: 4 (as an example)

This bug is completed by two other bugs around the same issue: decimal_precision:
- Change 'Sale Price' to 'Sale Price woTax' on List_price in product.py
- Allow change of decimals by default in configuration (and not in decimal_precision.py) to manage currencies without decimals







References