[FIX] On update, fields with only numeric/int/float could have digits

bzr revid: jvo@tinyerp.com-20091113135713-eiv4kfs9mkn4su3p
This commit is contained in:
Jay (Open ERP)
2009-11-13 19:27:13 +05:30
parent 4dc22b73e5
commit 0d7e1a5fcf
+5 -4
View File
@@ -1856,10 +1856,11 @@ class orm(orm_template):
if (f_pg_type==c[0]) and (f._type==c[1]):
# Adding upcoming 6 lines to check whether only the size of the fields got changed or not.E.g. :(16,3) to (16,4)
field_size_change = False
if f.digits:
field_size = (65535 * f.digits[0]) + f.digits[0] + f.digits[1]
if field_size != f_pg_size:
field_size_change = True
if f_pg_type in ['int4','numeric','float8']:
if f.digits:
field_size = (65535 * f.digits[0]) + f.digits[0] + f.digits[1]
if field_size != f_pg_size:
field_size_change = True
if f_pg_type != f_obj_type or field_size_change:
if f_pg_type != f_obj_type: