From 82565f571b748ac285754e1eb1a633b9bcd00c51 Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Fri, 25 Mar 2011 15:19:39 +0530 Subject: [PATCH 1/2] [FIX] Account: payment term line need at least 5 to 6 digits precision lp bug: https://launchpad.net/bugs/740596 fixed bzr revid: ara@tinyerp.com-20110325094939-k30q24tu5okj7mcm --- addons/account/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index 2bdb62b44c0..1dab0d077af 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -102,7 +102,7 @@ class account_payment_term_line(osv.osv): ('fixed', 'Fixed Amount')], 'Valuation', required=True, help="""Select here the kind of valuation related to this payment term line. Note that you should have your last line with the type 'Balance' to ensure that the whole amount will be threated."""), - 'value_amount': fields.float('Value Amount', help="For Value percent enter % ratio between 0-1."), + 'value_amount': fields.float('Value Amount', digits=(16, 6), help="For Value percent enter % ratio between 0-1."), 'days': fields.integer('Number of Days', required=True, help="Number of days to add before computation of the day of month." \ "If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."), 'days2': fields.integer('Day of the Month', required=True, help="Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."), From b2a3d521faf426e6affcea10d1dee3f707065a90 Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Wed, 27 Apr 2011 12:33:18 +0530 Subject: [PATCH 2/2] [FIX] account: payment term line need at least 5 to 6 digits precision bzr revid: ara@tinyerp.com-20110427070318-nq5757mhtqbay99o --- addons/account/account.py | 2 +- addons/account/data/account_data2.xml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 1dab0d077af..fec7f39d86e 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -102,7 +102,7 @@ class account_payment_term_line(osv.osv): ('fixed', 'Fixed Amount')], 'Valuation', required=True, help="""Select here the kind of valuation related to this payment term line. Note that you should have your last line with the type 'Balance' to ensure that the whole amount will be threated."""), - 'value_amount': fields.float('Value Amount', digits=(16, 6), help="For Value percent enter % ratio between 0-1."), + 'value_amount': fields.float('Value Amount', digits_compute=dp.get_precision('Payment Term'), help="For Value percent enter % ratio between 0-1."), 'days': fields.integer('Number of Days', required=True, help="Number of days to add before computation of the day of month." \ "If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."), 'days2': fields.integer('Day of the Month', required=True, help="Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."), diff --git a/addons/account/data/account_data2.xml b/addons/account/data/account_data2.xml index 4f482b496af..4a44c726960 100644 --- a/addons/account/data/account_data2.xml +++ b/addons/account/data/account_data2.xml @@ -21,7 +21,10 @@ - + + Payment Term + 6 +