diff --git a/product/ERP5Form/Form.py b/product/ERP5Form/Form.py index 8f8b8d8318bd1f4cf1868224852325d3c3d15d3c..079fe11459d748a8aa16bf2bb0dbc04091200444 100644 --- a/product/ERP5Form/Form.py +++ b/product/ERP5Form/Form.py @@ -352,6 +352,8 @@ class ERP5Form(ZMIForm, ZopePageTemplate): self.id = id self.title = title self.row_length = 4 + self.group_list = ["left", "right", "center", "bottom", "hidden"] + self.groups = dict.fromkeys(self.group_list, []) # Proxy method to PageTemplate def __call__(self, *args, **kwargs): @@ -402,7 +404,6 @@ class ERP5Form(ZMIForm, ZopePageTemplate): if they occur and raise a FormValidationError in the end if any Validation Errors occured. """ -# import pdb; pdb.set_trace() result = {} errors = [] for group in self.get_groups(): @@ -431,6 +432,7 @@ class ERP5Form(ZMIForm, ZopePageTemplate): errors.append(err) except KeyError, err: LOG('ERP5Form/Form.py:validate_all', 0, 'KeyError : %s' % (err, )) + if len(errors) > 0: raise FormValidationError(errors, result) return result diff --git a/product/ERP5Form/Report.py b/product/ERP5Form/Report.py index bc60379d6d0ba3f77a3b75efbf3957808ef7a5b0..ac2e496bc9c6067f402c9b6df9b6bd71b829ce28 100644 --- a/product/ERP5Form/Report.py +++ b/product/ERP5Form/Report.py @@ -115,19 +115,6 @@ class ERP5Report(ERP5Form): # Default Attributes pt = 'report_view' - def __init__(self, id, title, unicode_mode=0, - encoding='UTF-8', stored_encoding='UTF-8'): - """Initialize form. - id -- id of form - title -- the title of the form - """ - ZMIForm.inheritedAttribute('__init__')(self, "", "POST", "", id, - encoding, stored_encoding, - unicode_mode) - self.id = id - self.title = title - self.row_length = 4 - # Proxy method to PageTemplate def __call__(self, *args, **kwargs): if not kwargs.has_key('args'):