Commit f84fef62 authored by Sebastien Robin's avatar Sebastien Robin

bug corrected, do not clear read only fields


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@855 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7f36318a
......@@ -41,6 +41,7 @@ from AccessControl import Unauthorized, getSecurityManager, ClassSecurityInfo
from Products.ERP5Type.Utils import UpperCase
import psyco
import sys
# Patch the fiels methods to provide improved namespace handling
......@@ -90,7 +91,7 @@ class ERP5Field(Field):
except:
# We add this safety exception to make sure we always get
# something reasonable rather than generate plenty of errors
LOG('ERP5Form.get_value, exception on tales_expr: ',0,'')
LOG('ERP5Form.get_value, exception on tales_expr: ',0,'',error=sys.exc_info())
value = self.get_orig_value(id)
else:
# FIXME: backwards compat hack to make sure overrides dict exists
......@@ -151,7 +152,7 @@ class ERP5Field(Field):
value = REQUEST.form[key]
except (KeyError, AttributeError):
# fall back on default
return self.get_value('default',REQUEST=REQUEST) # It was missing on Formulator
return self.get_value('default',REQUEST=REQUEST) # The request was missing on Formulator
# if we enter a string value while the field expects unicode,
# convert to unicode first
......@@ -371,6 +372,8 @@ class ERP5Form(ZMIForm, ZopePageTemplate):
# skip any field we don't need to validate
if not field.need_validate(REQUEST):
continue
if not (field.get_value('editable')):
continue
try:
value = field.validate(REQUEST)
# store under id
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment