--- a/src/pyams_form/form.py Fri Oct 05 15:07:46 2018 +0200
+++ b/src/pyams_form/form.py Tue Oct 09 11:48:27 2018 +0200
@@ -728,13 +728,14 @@
try:
# check if current form is overriding "get_ajax_output" method
if base not in (AJAXAddForm, AJAXEditForm): # custom base
- basename = base.__qualname__
- baseklassname, _ = base.get_ajax_output.__qualname__.split('.')
- if baseklassname != basename: # overriden method
- new_class.get_ajax_output = ob.get_ajax_output
+ ob_ajax_parent, _ = ob.get_ajax_output.__qualname__.split('.')
+ base_ajax_parent, _ = base.get_ajax_output.__qualname__.split('.')
+ if (ob_ajax_parent != base_ajax_parent) and \
+ (ob_ajax_parent in ('AJAXForm', 'AJAXAddForm', 'AJAXEditForm')):
+ new_class.get_ajax_output = base.get_ajax_output
else:
- baseklassname, _ = ob.get_ajax_output.__qualname__.split('.')
- if baseklassname not in ('AJAXForm', 'AJAXEditForm'): # overriden method
+ base_ajax_parent, _ = ob.get_ajax_output.__qualname__.split('.')
+ if base_ajax_parent not in ('AJAXForm', 'AJAXAddForm', 'AJAXEditForm'): # overriden method
new_class.get_ajax_output = ob.get_ajax_output
except AttributeError:
pass