← Back to team overview

openerp-expert-accounting team mailing list archive

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

 

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: logo_kazacube_mini_225.png
Description: PNG image