From ef3c4df4effa1834ccf6eacae19d5423fdc590fc Mon Sep 17 00:00:00 2001 From: Tomas Peterka <tomas.peterka@nexedi.com> Date: Wed, 28 Feb 2018 10:43:38 +0100 Subject: [PATCH] [hal_json_style] Script must be called on a document (tests for this path are clearly missing) --- .../portal_skins/erp5_hal_json_style/Base_callDialogMethod.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_callDialogMethod.py b/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_callDialogMethod.py index a820a5e01c..75b7c70167 100644 --- a/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_callDialogMethod.py +++ b/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_callDialogMethod.py @@ -99,7 +99,7 @@ try: # Form is OK, it's just this field - style so we return back form-wide error # for which we don't have support out-of-the-box thus we manually craft it # XXX TODO: Form-wide validation errors - return Base_renderMessage( + return context.Base_renderMessage( translate('Only ODT, ODS, Hal and HalRestricted skins are allowed for reports '\ 'in Preferences - User Interface - Report Style'), level=WARNING) @@ -200,7 +200,7 @@ if dialog_method != update_method and clean_kw.get('deferred_style', 0): # Limit Reports in Deferred style to known working styles if request_form.get('your_portal_skin', None) not in ("ODT", "ODS"): # RJS own validation - deferred option works here only with ODS/ODT skins - return Base_renderMessage( + return context.Base_renderMessage( translate('Deferred reports are possible only with preference '\ '"Report Style" set to "ODT" or "ODS"'), level=WARNING) -- 2.30.9