From e154ef138b751d01f369e7a8858ceafc7c8e0518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 19 May 2008 11:10:42 +0200 Subject: [PATCH] Percentage in tax is in % for issue12 and add some help --- tax.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tax.py b/tax.py index 342ca24da7..39f94dfd84 100644 --- a/tax.py +++ b/tax.py @@ -207,11 +207,11 @@ class Tax(OSV): amount = fields.Numeric('Amount', digits=(16, 2), states={ 'invisible': "type != 'fixed'", - }, invisible=True) + }, help='In company\'s currency') percentage = fields.Numeric('Percentage', digits=(16, 8), states={ 'invisible': "type != 'percentage'", - }) + }, help='In %') type = fields.Selection([ ('percentage', 'Percentage'), ('fixed', 'Fixed'), @@ -319,7 +319,7 @@ class Tax(OSV): def _process_tax(self, cursor, user, tax, price_unit, context=None): if tax.type == 'percentage': - amount = price_unit * tax.percentage + amount = price_unit * tax.percentage / Decimal('100') return { 'base': price_unit, 'amount': amount,