[Erp5-report] r17711 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Nov 20 19:50:42 CET 2007


Author: jerome
Date: Tue Nov 20 19:50:42 2007
New Revision: 17711

URL: http://svn.erp5.org?rev=17711&view=rev
Log:
Base_callDialogMethod: The current dialog in can be a python script that returns a form, so if getattr(context, form_id) is not a form, call it to get the form.

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml?rev=17711&r1=17710&r2=17711&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml Tue Nov 20 19:50:42 2007
@@ -155,6 +155,11 @@
 else:\n
   form_context = context\n
 form = getattr(form_context, dialog_id)\n
+\n
+# form can be a python script that returns the form\n
+if not hasattr(form, \'validate_all_to_request\'):\n
+  form = form()\n
+\n
 # Validate the form\n
 try:\n
   # It is necessary to force editable_mode before validating\n
@@ -351,6 +356,7 @@
                             <string>form_context</string>
                             <string>getattr</string>
                             <string>form</string>
+                            <string>hasattr</string>
                             <string>request</string>
                             <string>editable_mode</string>
                             <string>validation_errors</string>
@@ -363,7 +369,6 @@
                             <string>field</string>
                             <string>k</string>
                             <string>v</string>
-                            <string>hasattr</string>
                             <string>splitted</string>
                             <string>len</string>
                             <string>_write_</string>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=17711&r1=17710&r2=17711&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Tue Nov 20 19:50:42 2007
@@ -1,1 +1,1 @@
-577
+579




More information about the Erp5-report mailing list