[Erp5-dev] external methods seems to not keep the calling context

Pelletier Vincent vincent at nexedi.com
Fri Dec 28 18:36:29 CET 2007


Hi.

For the ones (including me, at first sight) who don't get the big picture:

The code from Base_callDialogMethod[1] tries to invoke 
ERP5Site_createModuleScribus, an external method, using the following code, 
simplified:

  # kw contains values fetched from a submited form
  # dialog_method = "ERP5Site_createModuleScribus"
  dialog_form = getattr(context, dialog_method)
  return dialog_form(**kw)

The problem is that the call fails with the error message reported by Fabien.
Of course, this call is correct for usual cases where dialog_form is a regular 
script, so this call should not need to be changed.
As dialog_form is wrapped in acquisition context, it should not need to be 
explicitely passed to external method.

http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml

-- 
Vincent Pelletier



More information about the Erp5-dev mailing list