From 4f93c976a7a0fe1d1c7a847624e50a762fc9e0cb Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 21 Apr 2016 16:38:18 +0530 Subject: [PATCH] [fix] If precision > 6, use Decimal(21,9) to allow for 12 digits before the decimal dot like in (18,6) --- frappe/model/db_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/model/db_schema.py b/frappe/model/db_schema.py index 9f6a38e4ca..d71bff45a4 100644 --- a/frappe/model/db_schema.py +++ b/frappe/model/db_schema.py @@ -575,7 +575,7 @@ def get_definition(fieldtype, precision=None, length=None): if size: if fieldtype in ["Float", "Currency", "Percent"] and cint(precision) > 6: - size = '18,9' + size = '21,9' if coltype == "varchar" and length: size = length